Here's a job control conundrum for you.
    Ben Scott 
    dragonhawk at gmail.com
       
    Fri Apr 13 18:51:43 EDT 2007
    
    
  
On 4/13/07, Steven W. Orr <steveo at syslang.net> wrote:
>> My terminology might be wrong, but I was referring to the fact that
>> signals are not processed synchronously.
>
> Assuming we're in a modern sigaction environment instead of an old signal
> environment, all signals will queue up if you have set SIG_BLOCK ...
  Okay... I think that's a "yes".  :)  Point was that, just because
you sent a signal successfully, doesn't mean the target process has
actually had a chance to process that signal yet.  As another example,
if you send SIGHUP to a stopped process, the signal doesn't get acted
upon until the process is continued.
$ cat
[1]+  Stopped                 cat
$ killall --signal HUP --verbose cat
Killed cat(21642) with signal 1
$
$
$ fg
cat
Hangup
$
> ... except for SIGKILL which always goes right through.
  Oh.  Right.  Good point.
$ cat
[1]+  Stopped                 cat
$ killall --signal KILL --verbose cat
Killed cat(21644) with signal 9
[1]+  Killed                  cat
$
  So much for that idea.... :-/
> The best writeup of signal stuff that I've seen is in the OReilly book
> called UNIX Systems Programming for SVR4 (Nutshell Handbook). Other
> descriptions never punched the conceptual stuff through to me as well.
  One more thing to read... :)
-- Ben
    
    
More information about the gnhlug-discuss
mailing list