Ticket #18 (closed bug: fixed)
Possible race condition in jobq daemon launch
| Reported by: | vcaron | Owned by: | sbocahu |
|---|---|---|---|
| Priority: | major | Component: | jobq |
| Keywords: | Cc: |
Description
Jobq needs at most one daemon instance per queue. It uses a pidfile but does not lock it, so there is a race condition between the time this pidfile is read, the pid tested and a new instance eventually started.
Hints:
- Ugly hack: minimize time/instructions between pidfile reading and pidfile writing if another intsance was stared
- Correct fix: lock pidfile, but I'm not sure there's a lot of portable locking primtives from a shell
- We're kind of re-implemting start-stop-daemon or something like every distro might have... I'll prefer to keep this simple shell script portable, but if the correct way is a Debian dependency, let's go.
Change History
Note: See
TracTickets for help on using
tickets.
