Control-Z the Sleep Signal

Dan Nelson dnelson at allantgroup.com
Tue Jun 9 22:07:32 UTC 2009


In the last episode (Jun 09), Polytropon said:
> On Tue, 09 Jun 2009 16:30:30 -0500, Martin McCormick <martin at dc.cis.okstate.edu> wrote:
> > Which signal is sent to a process when one types ^z or Control-z?  It
> > appears to be SIGSTOP and according to signal's man page, this is one
> > signal you can't catch.

^Z sends a SIGTSTP, which can be caught (or ignored, in your case).

    18    SIGTSTP      stop process         stop signal generated from
                                            keyboard
> According to 
> 
> 	% stty -g
> 	... status=14:stop=13:susp=1a:time=0:werase=17: ...
 	                      ^^^^^^^
>      17    SIGSTOP      stop process         stop (cannot be caught or
>                                              ignored)
> 
> And I think that 17 (decimal) is refered to as 1a (hexadecimal)
> in the previous stty command.

1a hex just refers to the control code itself (^Z), and doesn't indicate
which signal is sent.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list