Discussion:
signaling SIGRTMIN+1 and SIGRTMIN+2 using pkill busybox applet.
Sameer Naik
2010-12-09 11:19:32 UTC
Permalink
Hello,

I am using busybox-1.15.2. I need to send -RTMIN+1 and -RTMIN+2
signals to specific processes. With the standard pkill command this
would be:
pkill -RTMIN+1 <process-name>
pkill -RTMIN+2 <process-name>

Since i am using busybox, i need to be able to send these signals via
the pkill busybox applet.

'pkill -l' reports the following

$ pkill -l
HUP
INT
QUIT
ILL
TRAP
ABRT
BUS
FPE
KILL
USR1
SEGV
USR2
PIPE
ALRM
TERM
STKFLT
CHLD
CONT
STOP
TSTP
TTIN
TTOU
URG
XCPU
XFSZ
VTALRM
PROF
WINCH
POLL
PWR
SYS

Here RTMIN+1 and RTMIN+2 are not listed, so i tried specifying the
signal numbers instead. On Fedora,
kill -l lists
[sameersbn at localhost opt]$ kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP
6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1
11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM
16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP
21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ
26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR
31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3
38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8
43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7
58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2
63) SIGRTMAX-1 64) SIGRTMAX

So in the busybox pkill applet i tried specifying the command as:
pkill -35 <process-name> for -RTMIN+1
pkill -36 <process-name> for -RTMIN+2

But this does not seem to work.

I was wondering whether it is possible to signal RTMIN+1 and RTMIN+2
to processes using the busybox pkill applet. Or would i have to use
the regular pkill command

Thanks and Regards
~Sameer
Denys Vlasenko
2010-12-30 00:18:37 UTC
Permalink
Post by Sameer Naik
Hello,
I am using busybox-1.15.2. I need to send -RTMIN+1 and -RTMIN+2
signals to specific processes. With the standard pkill command this
pkill -RTMIN+1 <process-name>
pkill -RTMIN+2 <process-name>
Since i am using busybox, i need to be able to send these signals via
the pkill busybox applet.
Fixed in git:

http://git.busybox.net/busybox/commit/?id=2753aae0e8728f527bedf103b1207857b7c3e151

Will go into 1.19.x
--
vda
Sameer Naik
2010-12-30 16:05:09 UTC
Permalink
thanks a lot! will check the changes and apply to 1.15.2 and make the
patch available.

On Thu, Dec 30, 2010 at 5:48 AM, Denys Vlasenko
Post by Denys Vlasenko
Post by Sameer Naik
Hello,
I am using busybox-1.15.2. I need to send -RTMIN+1 and -RTMIN+2
signals to specific processes. With the standard pkill command this
pkill -RTMIN+1 <process-name>
pkill -RTMIN+2 <process-name>
Since i am using busybox, i need to be able to send these signals via
the pkill busybox applet.
http://git.busybox.net/busybox/commit/?id=2753aae0e8728f527bedf103b1207857b7c3e151
Will go into 1.19.x
--
vda
Sameer Naik
2010-12-30 17:52:42 UTC
Permalink
I think you may have missed out on adding

config FEATURE_RTMINMAX

in one of the config files.

On Thu, Dec 30, 2010 at 9:35 PM, Sameer Naik
Post by Sameer Naik
thanks a lot! will check the changes and apply to 1.15.2 and make the
patch available.
On Thu, Dec 30, 2010 at 5:48 AM, Denys Vlasenko
Post by Denys Vlasenko
Post by Sameer Naik
Hello,
I am using busybox-1.15.2. I need to send -RTMIN+1 and -RTMIN+2
signals to specific processes. With the standard pkill command this
pkill -RTMIN+1 <process-name>
pkill -RTMIN+2 <process-name>
Since i am using busybox, i need to be able to send these signals via
the pkill busybox applet.
http://git.busybox.net/busybox/commit/?id=2753aae0e8728f527bedf103b1207857b7c3e151
Will go into 1.19.x
--
vda
Denys Vlasenko
2010-12-30 23:00:58 UTC
Permalink
Post by Sameer Naik
I think you may have missed out on adding
config FEATURE_RTMINMAX
in one of the config files.
In current version, it can be embedded in .c file like this
in libbb/u_signal_names.c:

//config:config FEATURE_RTMINMAX
//config: bool "Support RTMIN[+n] and RTMAX[-n] signal names"
//config: default y
//config: help
//config: Support RTMIN[+n] and RTMAX[-n] signal names
//config: in kill, killall etc. This costs ~250 bytes.
--
vda
Sameer Naik
2010-12-31 03:45:23 UTC
Permalink
ok... was not aware.

On Fri, Dec 31, 2010 at 4:30 AM, Denys Vlasenko
Post by Denys Vlasenko
Post by Sameer Naik
I think you may have missed out on adding
config FEATURE_RTMINMAX
in one of the config files.
In current version, it can be embedded in .c file like this
//config:config FEATURE_RTMINMAX
//config: ? ? ?bool "Support RTMIN[+n] and RTMAX[-n] signal names"
//config: ? ? ?default y
//config: ? ? ?help
//config: ? ? ? ?Support RTMIN[+n] and RTMAX[-n] signal names
//config: ? ? ? ?in kill, killall etc. This costs ~250 bytes.
--
vda
Sameer Naik
2010-12-31 17:30:13 UTC
Permalink
attached is the patch for 1.15.2 with the changeset mentioned in this thread.

On Fri, Dec 31, 2010 at 9:15 AM, Sameer Naik
Post by Sameer Naik
ok... was not aware.
On Fri, Dec 31, 2010 at 4:30 AM, Denys Vlasenko
Post by Denys Vlasenko
Post by Sameer Naik
I think you may have missed out on adding
config FEATURE_RTMINMAX
in one of the config files.
In current version, it can be embedded in .c file like this
//config:config FEATURE_RTMINMAX
//config: ? ? ?bool "Support RTMIN[+n] and RTMAX[-n] signal names"
//config: ? ? ?default y
//config: ? ? ?help
//config: ? ? ? ?Support RTMIN[+n] and RTMAX[-n] signal names
//config: ? ? ? ?in kill, killall etc. This costs ~250 bytes.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox_1_15_2_rtmin_rtmax_support.patch
Type: text/x-patch
Size: 2069 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20101231/227276fe/attachment.bin>
Loading...