rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: arnold@cc.gatech.edu (Arnold Robbins)
To: rc@hawkwind.utcs.toronto.edu
Subject: rc and signals
Date: Fri, 16 Apr 1993 11:00:32 -0400	[thread overview]
Message-ID: <9304161500.AA02363@penfold.cc.gatech.edu> (raw)

> The more I think about it, the more I don't like the way rc uses signals
> as indicies.  I would rather see it extend sigmsgs to contain rows like
> 	{SIGTERM, "sigterm", "terminated"}
> Then, rather then using a signal as an index, it looped through the table
> to find the matching SIGxxx, and then used the table subscript as the
> index.  It might be possible to generate this table automatically.

Another way to do it would be to generate the table

	#ifdef SIGFOO
		{ SIGFOO, "sigfoo", "murphy came to town"},
	#endif /* SIGFOO */

Then, at startup, sort the table, eliminate duplicates, and voila, the
signal can be used an index again.

The "standard" signals don't need the ifdefs, but there are lots of other
signals that are not universal, and also signals that are often aliased
to each other (e.g. SIGPOLL <-> SIGIO, SIGCLD <-> SIGCHLD. Aren't merged
Unixes wondeful?)

I believe ksh does something along these lines.  For all that ksh may be
bloated as a language, DGK is one smart guy and there's no reason not to
borrow implementation tricks.

Arnold


             reply	other threads:[~1993-04-16 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-16 15:00 Arnold Robbins [this message]
1993-04-16 15:30 rsalz
1993-04-20  1:29 ` John Mackin
1993-04-16 16:02 Arnold Robbins

Reply instructions:

You may reply publicly 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=9304161500.AA02363@penfold.cc.gatech.edu \
    --to=arnold@cc.gatech.edu \
    --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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).