From owner-freebsd-bugs Sun May 6 14:40: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E6E3837B43F for ; Sun, 6 May 2001 14:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f46Le1174920; Sun, 6 May 2001 14:40:01 -0700 (PDT) (envelope-from gnats) Received: from iss-p1.lbl.gov (iss-p1.lbl.gov [131.243.2.47]) by hub.freebsd.org (Postfix) with ESMTP id 9753937B422 for ; Sun, 6 May 2001 14:39:25 -0700 (PDT) (envelope-from jin@iss-p1.lbl.gov) Received: (from jin@localhost) by iss-p1.lbl.gov (8.11.3/8.11.3) id f46LdO606527; Sun, 6 May 2001 14:39:24 -0700 (PDT) (envelope-from jin) Message-Id: <200105062139.f46LdO606527@iss-p1.lbl.gov> Date: Sun, 6 May 2001 14:39:24 -0700 (PDT) From: Jin Guojun (DSD staff) Reply-To: j_guojun@lbl.gov To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/27163: sh trap TSTP () deadly hangs Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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 : 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