Guillem Jover wrote: > Hi! > > On Tue, 2009-03-10 at 18:06:16 +0100, Raphael Hertzog wrote: >> On Tue, 10 Mar 2009, Michael Biebl wrote: >>> I have a binary named console-kit-daemon, which I'd like to stop using >>> --name but running "start-stop-daemon --stop --name console-kit-daemon" >>> fails to identify the process. Problem is, that the process is shortened >>> to 15 chars in /proc/<pid>/start, e.g. >>> # cat /proc/10239/stat >>> 10239 (console-kit-dae) S 1 10239 10239 0 -1 4194624 536 0 0 0 0 0 0 0 >>> 20 0 63 0 389470 8273920 190 4294967295 134512640 134634988 3215792784 >>> 3215792132 3086693412 0 0 4096 512 4294967295 0 0 17 0 0 0 0 0 0 >>> >>> Running "start-stop-daemon --stop --name console-kit-dae" does stop the >>> process. >> You already upgraded #353015 to important in the past and now you file a >> duplicate of the bug… it looks like it's time for you to write a patch for >> this. :-) > > Adding such check is trivial, the reason why I've not done that yet is > because I've not found any reliable way to check for the limit from > the Linux kernel at run time, not even at build time (TASK_COMM_LEN in > linux/sched.h is protected by __KERNEL__), also checking for truncated > strings makes the --name option even less reliable than it is already, > but I guess we can hardcode it, warn if the strings matches a truncated > one, and update it if it ever changes. I'll code something tomorrow. > > On the other hand why can't you use --exec instead which is way more > reliable, and should not suffer from this problem?
I have used --exec now. If the usage of --name is disouraged and not properly fixable, then the man page and --help should at least add a warning and document this shortcoming. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature