Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/lorder Use "trap ... 0" instead of "trap ... EXIT", ...
details: https://anonhg.NetBSD.org/src/rev/8eae6450feab
branches: trunk
changeset: 515553:8eae6450feab
user: tv <tv%NetBSD.org@localhost>
date: Fri Sep 28 14:41:44 2001 +0000
description:
Use "trap ... 0" instead of "trap ... EXIT", and use numeric signals for
"trap ... HUP ..." if the named signals cause the trap statement to fail.
This improves backwards compatibility of this script.
diffstat:
usr.bin/lorder/lorder.sh | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (22 lines):
diff -r bdbd04235416 -r 8eae6450feab usr.bin/lorder/lorder.sh
--- a/usr.bin/lorder/lorder.sh Fri Sep 28 14:34:49 2001 +0000
+++ b/usr.bin/lorder/lorder.sh Fri Sep 28 14:41:44 2001 +0000
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $NetBSD: lorder.sh,v 1.9 2001/06/18 12:07:32 lukem Exp $
+# $NetBSD: lorder.sh,v 1.10 2001/09/28 14:41:44 tv Exp $
#
# Copyright (c) 1990, 1993
# The Regents of the University of California. All rights reserved.
@@ -68,8 +68,9 @@
S=`mktemp /tmp/_symbol_.XXXXXX` || exit 1
# remove temporary files on exit
-trap "rm -f $N $R $S; exit 0" EXIT
-trap "rm -f $N $R $S; exit 1" HUP INT QUIT PIPE TERM
+trap "rm -f $N $R $S; exit 0" 0
+trap "rm -f $N $R $S; exit 1" HUP INT QUIT PIPE TERM 2>/dev/null || \
+ trap "rm -f $N $R $S; exit 1" 1 2 3 13 15
# if the line ends in a colon, assume it's the first occurrence of a new
# object file. Echo it twice, just to make sure it gets into the output.
Home |
Main Index |
Thread Index |
Old Index