Subject: Re: sh: builtin function trap
To: None <chet@po.CWRU.Edu>
From: Claude Marinier <claude.marinier@dreo.dnd.ca>
List: netbsd-help
Date: 02/28/2001 08:47:27
May I suggest that you look at bash: they accept symbolic names (short
ones, e.g. INT) and reference signal.h for the symbol values.

On Wed, 28 Feb 2001, Chet Ramey wrote:
> > > It wouldn't be a hard thing to do. Is there a specification that
> > > describes the requirements and the expected behavior for this sh and
> > > in particular for the builtin trap function?
> >
> > Dunno.  I'd check POSIX; they were certainly keen on having kill(1)
> > accept names, so I wouldn't be surprised if they had something to say
> > about sh(1).
>
> `trap' is required to accept signal names, possibly with a `SIG' prefix.
> It may not accept signal numbers unless the system's signal numbering
> corresponds to a set of values enumerated in the POSIX standard
> (SIGHUP == 1, SIGINT == 2, and so on).

-- 
Claude Marinier, Information Technology Group    claude.marinier@dreo.dnd.ca
Defence Research Establishment Ottawa (DREO)    (613) 998-4901  FAX 998-2675
3701 Carling Avenue, Ottawa, Ontario  K1A 0Z4         http://www.dreo.dnd.ca