Here's a job control conundrum for you.

Steven W. Orr steveo at syslang.net
Wed Apr 11 09:53:27 EDT 2007


On Tuesday, Apr 10th 2007 at 16:35 -0400, quoth Steven W. Orr:

=>I go to work in the morning and ssh in to my 'puter at home. I run alpine
=>which is my preferred text mail interface.
=>
=>At the end of the day I don't want to cleanly exit from alpine (for reasons
=>that are not important). Instead I want to kill it.
=>
=>I ^Z out of alpine so I have a stopped job. Here's where it gets interesting:
=>
=>If I say killall -1 alpine there's no effect.
=>If I say kill -1 %1 it does what I want.
=>
=>Anyone understand this?

My apologies. I confused more people than I intended. I think this is a 
question about the mechanics of signal delivery and not so much about 
which kill command I'm using or what process I'm killing.

I'm using the bash builtin kill command and the killall command from 
psmisc. If I say
killall -9 alpine
then it dies. No problem. If I say
kill -1 %1
it dies also. The question I have is why
killall -1 alpine
does NOT work. Obviously, since the killall does work with SIGKILL then 
killall is succeeding at delivering the signal. The HUP therefore must 
also be successfully getting delivered by killall, but the process 
(alpine) is not handling the signal in the same way.

AFAIK, there's not supposed to be any difference in semantics dependant on 
whether the sender of the signal is in the same process group. (I only 
mention this because I can't think of anything else.) And yes I am aware 
of the difference in the kill command between Bourne and C shell flavoured 
shells. I am using bash, though in this case it shouldn't make any 
difference.

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net


More information about the gnhlug-discuss mailing list