Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2001 14:39:24 -0700 (PDT)
From:      Jin Guojun (DSD staff) <jin@iss-p1.lbl.gov>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/27163: sh trap TSTP () deadly hangs
Message-ID:  <200105062139.f46LdO606527@iss-p1.lbl.gov>

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

>Number:         27163
>Category:       bin
>Synopsis:       sh trap TSTP () deadly hangs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 06 14:40:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD iss-p1.lbl.gov 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Wed May 2 11:12:43 PDT 2001 root@iss-p1.lbl.gov:/usr/src/sys/compile/MinMax i386


	FreeBSD 4.3-RELEASE

>Description:

	According to the signal manpage:  

     Except for the SIGKILL and SIGSTOP signals, the
     signal() function allows for a signal to be caught, to be ignored, or to
     generate an interrupt.  These signals are defined in the file <signal.h>:

     Name            Default Action          Description
	...

    Would this imply that /bin/sh can trap (catch) the SIGTSTP ?
    However, it is not. Try the following script, it deadly hangs 
    if "" pressed.

>How-To-Repeat:

	---------- sh script -----
	trap    "echo do not try this; exit"    TSTP
	while [ 1 ] ;   do
        	date
        	sleep 2
	done
	---------- end of sh script -----

	sh script
	Sun May  6 13:26:05 PDT 2001
	Sun May  6 13:26:07 PDT 2001
	

>Fix:

	
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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