NetBSD Problem Report #619

From gnats  Wed Dec  7 11:27:31 1994
Received: from spinne.web.net (spinne.web.net [142.75.1.4]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id LAA03558 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Wed, 7 Dec 1994 11:27:30 -0800
Message-Id: <m0rFS21-000MFLC@spinne.web.net>
Date: Wed, 7 Dec 94 14:28 EST
From: woods@spinne.web.net
Reply-To: woods
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: /bin/sh give error message when executing trap 0 script
X-Send-Pr-Version: 3.2

>Number:         619
>Category:       bin
>Synopsis:       /bin/sh give error message when executing trap 0 script
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 07 11:35:02 +0000 1994
>Closed-Date:    Sun Jan 15 10:19:11 +0000 1995
>Last-Modified:  
>Originator:     Greg A. Woods
>Release:        1.0
>Organization:
Nirv Community Resource Centre, Inc.
>Environment:

System: NetBSD spinne 1.0 NetBSD 1.0 (SPINNE) #27: Mon Nov 14 14:48:08 EST 1994 david@spinne:/home/src/sys/arch/i386/compile/SPINNE i386

>Description:
	sometimes when executing a trap statement, the shell says:

		trap: Sigaction system call failed

	I suspect it is failing when a trap call such as this is tried:

		trap "" 1 2 3 4 5 6 7 8 9 10 12 13 14 15

>How-To-Repeat:

	in your .profile, execute the following

		trap '. $HOME/.shlogout ; exit $?' 0

	~/.shlogout contains:

----- cut here ----
#
#	.shlogout - logout script for ksh
#
#ident	"@(#)HOME:.shlogout	1.1	94/12/07 18:17:37 (web.net)"

trap "" 1 2 3 4 5 6 7 8 9 10 12 13 14 15
trap "" 0
echo ""
echo "| Logging $LOGNAME out of $UUNAME at `date`."
if expr `tty` : "/dev/tty[ab0]" >/dev/null; then
	sleep 2
	tput clear
fi
exit 0
----- end cut ----

	then logout and watch what happens....

>Fix:
	unknown
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Sun Jan 15 02:19:11 PST 1995 
State-Changed-Why:  
This is not a bug; you can't trap SIGKILL or SIGSTOP.  POSIX says the behaviour 
is undefined. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.