Date: Wed, 10 Jun 2009 00:15:27 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Polytropon <freebsd@edvax.de> Cc: Martin McCormick <martin@dc.cis.okstate.edu>, freebsd-questions@freebsd.org Subject: Re: Control-Z the Sleep Signal Message-ID: <20090609221527.GA43458@owl.midgard.homeip.net> In-Reply-To: <20090609234215.32201c06.freebsd@edvax.de> References: <200906092130.n59LUU7E000141@dc.cis.okstate.edu> <20090609234215.32201c06.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 09, 2009 at 11:42:15PM +0200, Polytropon wrote: > On Tue, 09 Jun 2009 16:30:30 -0500, Martin McCormick <martin@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. > > You can check the setting with this command: > > % stty -a > cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>; > eol2 = <undef>; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U; > lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; > status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; > ^^^^^^^^^ > > This entry indicates that ^Z sends the suspend signal. Not quite. It indicates (according to stty(1)) that ^Z generates the SUSP character. The termios(4) manpage (referenced by stty(1)) says that SUSP If the ISIG flag is enabled, receipt of the SUSP character causes a SIGTSTP signal to be sent to all processes in the foreground process group for which the terminal is the controlling terminal, and the SUSP character is discarded when processed. So it appears to be SIGTSTP which is sent by typing ^Z, which agrees with signal(3) where the SIGTSTP signal is described as "stop signal generated from keyboard" -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090609221527.GA43458>