Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Dec 1996 15:59:55 -0800 (PST)
From:      Steve Price <steve>
To:        CVS-committers, cvs-all, cvs-bin
Subject:   cvs commit:  src/bin/sh trap.c
Message-ID:  <199612242359.PAA12589@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

steve       96/12/24 15:59:54

  Modified:    bin/sh    trap.c
  Log:
  With these changes sh(1)'s trap command should be POSIX-compliant,
  while remaining (becoming :) compatible with other popular shells.
  Specifically these changes include:
  
  1) Implement 'trap -l' to get a list of valid signals names.  This
     is useful if you wanted to do something like reset all signal
     handlers to there defaults values, in which case something like
     this will do the trick.
  
  	trap `trap -l`
  
  2) Reformat the output of 'trap' so it can be saved and later eval'd
     to restore the saved settings.
  
  3) Allow the use of signal names as well as signal numbers.
  
  4) Fix trap handling of SIGCHLD so that commands like the following
     (albeit, contrived) won't cause sh(1) to recurse ad infinitum.
  
  	trap uname 0 20
  
  5) Make variables static that are used only in trap.c.
  
  6) Minor 'style(9) police' mods.
  
  Revision  Changes    Path
  1.6       +107 -49   src/bin/sh/trap.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612242359.PAA12589>