Bug#694980: dpkg: start-stop-daemon should wait when stopping the daemon

2012-12-03 Thread Guillem Jover
Control: retitle -1 s-s-d: Race condition when finding pid and checking it's still running On Mon, 2012-12-03 at 01:28:52 +0100, Salvo Tomaselli wrote: > > That's because those calls only apply to child processes which is not > > the case with s-s-d --stop. > There are alternative safe ways to d

Bug#694980: dpkg: start-stop-daemon should wait when stopping the daemon

2012-12-02 Thread Salvo Tomaselli
> That's because those calls only apply to child processes which is not > the case with s-s-d --stop. There are alternative safe ways to detect it, like using ptrace or [1]. A cycle with kill(0) is not safe, another process with the same pid could be started between two iterations. > That behav

Bug#694980: dpkg: start-stop-daemon should wait when stopping the daemon

2012-12-02 Thread Guillem Jover
Hi! On Sun, 2012-12-02 at 22:40:04 +0100, Salvo Tomaselli wrote: > Package: dpkg > Version: 1.16.9 > Severity: normal > after inspecting start-stop-daemon's source, i couldn't find any wait/waitpid > calls, and they should exist. That's because those calls only apply to child processes which is

Bug#694980: dpkg: start-stop-daemon should wait when stopping the daemon

2012-12-02 Thread Salvo Tomaselli
Package: dpkg Version: 1.16.9 Severity: normal Dear Maintainer, after inspecting start-stop-daemon's source, i couldn't find any wait/waitpid calls, and they should exist. Stopping a daemon usually consists in sending a message to the right pid, but after that it would be better to do a waitpid s