From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from burdell.cc.gatech.edu ([130.207.3.207]) by hawkwind.utcs.toronto.edu with SMTP id <2771>; Fri, 16 Apr 1993 11:01:17 -0400 Received: from penfold.cc.gatech.edu by burdell.cc.gatech.edu with SMTP id AA07854 (5.65c/IDA-1.4.4 for ); Fri, 16 Apr 1993 11:00:38 -0400 Received: by penfold.cc.gatech.edu (4.1/SMI-4.1) id AA02363; Fri, 16 Apr 93 11:00:32 EDT From: arnold@cc.gatech.edu (Arnold Robbins) Message-Id: <9304161500.AA02363@penfold.cc.gatech.edu> Date: Fri, 16 Apr 1993 11:00:32 -0400 X-Ultrix: Just Say NO! X-Important-Saying: Premature Optimization Is The Root Of All Evil. X-Mailer: Mail User's Shell (7.2.3 5/22/91) To: rc@hawkwind.utcs.toronto.edu Subject: rc and signals > 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