rc-list - mailing list for the rc(1) shell
 help / Atom feed
From: malte@techfak.uni-bielefeld.de
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: rc and signal handlers 
Date: Fri, 6 Nov 1992 07:03:35 -0500
Message-ID: <9211061203.AA01626@dahlie.techfak.uni-bielefeld.de> (raw)
In-Reply-To: <cks@hawkwind.utcs.toronto.edu>

	
	| Also, the man-page is not too clear about signals:
	|  "Only signals that are being ignored are passed on to programs run by rc"
	| The should read "signals that are being caught", I guess.
	
	 The manpage is correct as written; caught signals are not passed on to
	children, and revert to default behavior. Only ignored signals are passed
	on to children.
	
	 If one thinks about how catching signals works, it becomes obvious that
	this has to be that way.
	
		- cks

This is perfectly true! But also ugly ! This way, one has to redefine signal
handlers for each backquote substitution. On BSD and System V children
inherit signal handlers when forking and one has to change them explicitly.
Could someone explain to me why rc does it automatically ? I'd rather prefer
a simple way to reset signal handlers, something like

	fn sigreset {
		for( sig in `{ whatis -s | cut -f2 '-d ' } )
			eval fn $sig
	}

About "return"ing from a signal handler: One really doesn't want to do that.
I just mentioned it to make it clear to beginners. What bothers me most is
that rc doesn't complain about a return when defining the function and that
everything is fine when invoking the function interactively. But, when the
signal is caught, you'll get "return outside of function".

Malte



  parent reply index

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-11-05 20:45 malte
1992-11-05 23:16 ` Chris Siebenmann
1992-11-05 22:00 byron
1997-09-17 15:56 are there any patches which add ~ expansion to rc Joseph Skinner
1997-09-17 21:56 ` Scott Schwartz
1997-09-17 22:08 ` Mark K. Gardner
1997-09-18 23:26 Chris Siebenmann
     [not found] ` <cks@hawkwind.utcs.toronto.edu>
1992-06-04 10:05   ` $pid malte
1992-11-04 12:45   ` set subtract malte
1992-11-06 12:03   ` malte [this message]
1997-09-19 17:21   ` are there any patches which add ~ expansion to rc Jeremy Fitzhardinge
2001-10-24  3:25   ` Beta release rc-1.6b3 available Chris Siebenmann
2001-10-24  3:41     ` Scott Schwartz
2000-04-26 15:02 building rc on QNX4 Sam Roberts
2000-04-27 16:56 Scott Schwartz
2000-04-27 20:41 ` Sam Roberts
2000-04-28  7:28   ` vrl (was: Re: building rc on QNX4) Gert-Jan Vons
2000-04-28 18:38     ` Sam Roberts
2000-05-02  8:16       ` Gert-Jan Vons
2000-04-28 19:03     ` rc not session leader? Sam Roberts
2000-04-27 17:39 building rc on QNX4 Carlo Strozzi
2000-05-02 14:41 ` Tim Goodwin
2000-05-04 15:18 Carlo Strozzi
2000-05-08  8:29 ` Tim Goodwin
     [not found]   ` <tjg@star.le.ac.uk>
2000-05-08 11:50     ` David Luyer
2002-04-04 10:04     ` rc 1.6 $version Tim Goodwin
2002-04-04 21:42       ` Scott Schwartz
2000-05-08 13:28   ` building rc on QNX4 Carlo Strozzi
     [not found] <tell@cs.unc.edu>
2000-05-08 23:25 ` Stephen Tell
2000-05-10  0:37   ` builtins Scott Schwartz
2000-05-12  7:22     ` builtins Carlo Strozzi
2001-10-15 13:56 Beta release rc-1.6b3 available Tim Goodwin
2001-10-17 14:13 ` Buggs
2001-10-17 14:34   ` Tim Goodwin
2001-10-17 21:13     ` Buggs
2001-10-23  7:55 ` Carlo Strozzi
2001-10-23 12:44   ` Tim Goodwin
2001-10-23 15:47   ` Markus Friedl
2001-10-23 21:09     ` Carlo Strozzi
     [not found] <sroberts@certicom.com>
2001-10-23 15:55 ` Sam Roberts
2001-10-23 21:14   ` Scott Schwartz
2001-10-23 21:32 Carlo Strozzi
2001-10-24  3:34 ` Chris Siebenmann
2001-10-24  8:04   ` Carlo Strozzi
2002-03-14 22:37 rc 1.6 $version erik quanstrom
2002-03-27 13:27 ` Tim Goodwin
2002-03-27 21:12   ` Carlo Strozzi
2002-03-30 18:43     ` Paul Haahr
2002-03-31 15:13       ` Carlo Strozzi
2002-04-03 14:31       ` Tim Goodwin
2002-04-03 15:06         ` Paul Haahr

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9211061203.AA01626@dahlie.techfak.uni-bielefeld.de \
    --to=malte@techfak.uni-bielefeld.de \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

rc-list - mailing list for the rc(1) shell

Archives are clonable: git clone --mirror http://inbox.vuxu.org/rc-list

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.rc-list


AGPL code for this site: git clone https://public-inbox.org/ public-inbox