[PATCH] Make start-stop-daemon handle sending signals better

Jason Schoon floydpink at gmail.com
Mon Aug 28 19:09:08 UTC 2006


I found that the -s option to start-stop-daemon to specify a different
signal to send when the -K option is specified was not working correctly.

Attached are patches against both 1.2.1, and the current image of the trunk
that I have.

*TRUNK*
--- busybox/debianutils/start_stop_daemon.c     2006-08-18 23:15:
36.000000000 -0500
+++ busybox/debianutils/start_stop_daemon.c.mine        2006-08-18 23:15:
24.000000000 -050
0
@@ -250,7 +250,9 @@
                        USE_FEATURE_START_STOP_DAEMON_FANCY(&& !(opt &
SSD_OPT_VERBOSE));

        if (signame) {
-               signal_nr = bb_xgetlarg(signame, 10, 0, NSIG);
+               signal_nr = get_signum(signame);
+               if (signal_nr < 0)
+                       bb_show_usage();
        }

        if (!startas)


*1.2.1*
--- busybox/debianutils/start_stop_daemon.c     2006-06-30 17:42:
04.000000000 -0500
+++ busybox/debianutils/start_stop_deamon.c     2006-08-18 23:13:
15.000000000 -0500
@@ -257,7 +257,8 @@
                        USE_FEATURE_START_STOP_DAEMON_FANCY(&& !(opt &
SSD_OPT_VERBOSE));

        if (signame) {
-               signal_nr = bb_xgetlarg(signame, 10, 0, NSIG);
+               if (!u_signal_names(signame, &signal_nr, 0))
+                       bb_show_usage();
        }

        if (!startas)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20060828/e01ad5fb/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox_start-stop-daemon_signal.patch
Type: text/x-patch
Size: 442 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060828/e01ad5fb/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox_start-stop-daemon_signal-1.2.1.patch
Type: text/x-patch
Size: 409 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060828/e01ad5fb/attachment-0005.bin 


More information about the busybox mailing list