aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorStefan Farfeleder <stefanf@FreeBSD.org>2005-12-08 21:18:59 +0000
committerStefan Farfeleder <stefanf@FreeBSD.org>2005-12-08 21:18:59 +0000
commit0673e800e9558e552fc937f1b5a885e3f8ebf0c3 (patch)
tree3c5231e3951b4af01342f595b4a26e90ef20c2f0 /bin
parent3f0131f65b888f7bfb635fdbf82891b884cd2f91 (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/sh.116
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index df6b626b3c61..6fa59ede50c2 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
-.Dd December 4, 2005
+.Dd December 8, 2005
.Dt SH 1
.Os
.Sh NAME
@@ -1957,6 +1957,7 @@ The first output line shows the user and system times for the shell
itself, the second one contains the user and system times for the
children.
.It Ic trap Oo Ar action Oc Ar signal ...
+.It Ic trap Fl l
Cause the shell to parse and execute
.Ar action
when any specified
@@ -1968,14 +1969,25 @@ In addition, the pseudo-signal
may be used to specify an action that is performed when the shell terminates.
The
.Ar action
-may be null or omitted;
+may be an empty string or a dash
+.Pq Ar - ;
the former causes the specified signal to be ignored
and the latter causes the default action to be taken.
+Omitting the
+.Ar action
+is another way to request the default action, for compatibility reasons this
+usage is not recommended though.
When the shell forks off a subshell,
it resets trapped (but not ignored) signals to the default action.
The
.Ic trap
command has no effect on signals that were ignored on entry to the shell.
+.Pp
+Option
+.Fl l
+causes the
+.Ic trap
+command to display a list of valid signal names.
.It Ic type Op Ar name ...
Interpret each
.Ar name