From owner-freebsd-questions@FreeBSD.ORG Tue Jun 9 22:15:48 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D98611065673 for ; Tue, 9 Jun 2009 22:15:48 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id 93EDB8FC16 for ; Tue, 9 Jun 2009 22:15:48 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-255-48-78.bredband.comhem.se ([83.255.48.78]:64605 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.69) (envelope-from ) id 1ME9bP-00072T-4p for freebsd-questions@freebsd.org; Wed, 10 Jun 2009 00:15:33 +0200 Received: (qmail 67743 invoked from network); 10 Jun 2009 00:15:27 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 10 Jun 2009 00:15:27 +0200 Received: (qmail 43729 invoked by uid 1001); 10 Jun 2009 00:15:27 +0200 Date: Wed, 10 Jun 2009 00:15:27 +0200 From: Erik Trulsson To: Polytropon Message-ID: <20090609221527.GA43458@owl.midgard.homeip.net> References: <200906092130.n59LUU7E000141@dc.cis.okstate.edu> <20090609234215.32201c06.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090609234215.32201c06.freebsd@edvax.de> User-Agent: Mutt/1.5.19 (2009-01-05) X-Originating-IP: 83.255.48.78 X-Scan-Result: No virus found in message 1ME9bP-00072T-4p. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1ME9bP-00072T-4p c87e6947e8d7d854eb6f21c4cad1555a Cc: Martin McCormick , freebsd-questions@freebsd.org Subject: Re: Control-Z the Sleep Signal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 22:15:49 -0000 On Tue, Jun 09, 2009 at 11:42:15PM +0200, Polytropon wrote: > On Tue, 09 Jun 2009 16:30:30 -0500, Martin McCormick 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 = ; > eol2 = ; 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" -- Erik Trulsson ertr1013@student.uu.se