Bug#610719: dpkg: [S-S-B] make start-stop-daemon find out the pid of forked processes

2018-12-21 Thread Trek
this patch would be really useful for daemons like udev that does not create the pidfile (bugs #791944 and #908796) ciao!

Bug#610719: dpkg: [S-S-B] make start-stop-daemon find out the pid of forked processes

2011-02-14 Thread Peter Gyongyosi
Hi, On 02/14/2011 08:00 AM, Guillem Jover wrote: This feature could be used in two scenarios: 1) the program forks itself but it cannot output its PID into a file Why? If it's because it does not have such option, then the correct fix is to add it, it should not amount to more than

Bug#610719: dpkg: [S-S-B] make start-stop-daemon find out the pid of forked processes

2011-02-13 Thread Guillem Jover
Hi! On Fri, 2011-01-21 at 17:58:18 +0100, Peter Gyongyosi wrote: Package: dpkg Version: 1.15.5.6ubuntu4.3 Severity: wishlist Tags: patch the attached patch adds the functionality to start-stop-daemon that makes it capable of tracking and detecting the PID of programs it starts and which

Bug#610719: dpkg: [S-S-B] make start-stop-daemon find out the pid of forked processes

2011-01-22 Thread Peter Gyongyosi
Hi, On 01/21/2011 07:18 PM, Jonathan Nieder wrote: +start_trace(pid_t pid) +{ +wait(NULL); + +int retries; +const int max_retries = 10; + +for (retries = 0; retries max_retries; ++retries) { +if (ptrace (PTRACE_SETOPTIONS, pid, NULL, +

Bug#610719: dpkg: [S-S-B] make start-stop-daemon find out the pid of forked processes

2011-01-22 Thread Jonathan Nieder
Hi again, Peter Gyongyosi wrote: But I do not understand your other remark: I am indeeed using TRACEME, all other ptrace calls are just to limit the tracing to only forks and to get the PID we need. Sorry, that was just my sloppiness. Perhaps renaming the function, along the lines of

Bug#610719: dpkg: [S-S-B] make start-stop-daemon find out the pid of forked processes

2011-01-21 Thread Peter Gyongyosi
Package: dpkg Version: 1.15.5.6ubuntu4.3 Severity: wishlist Tags: patch Hi, the attached patch adds the functionality to start-stop-daemon that makes it capable of tracking and detecting the PID of programs it starts and which fork themselves. The manpage entries for the new arguments

Bug#610719: dpkg: [S-S-B] make start-stop-daemon find out the pid of forked processes

2011-01-21 Thread Jonathan Nieder
Hi, First of all, thanks for sending this. Peter Gyongyosi wrote: --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c [...] @@ -361,6 +369,152 @@ pid_list_free(struct pid_list **list) [...] +static void +start_trace(pid_t pid) +{ + wait(NULL); + + int retries; +