From owner-freebsd-questions Tue Oct 13 13:02:17 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA12097 for freebsd-questions-outgoing; Tue, 13 Oct 1998 13:02:17 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from aero.org (aero.org [130.221.16.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA12091 for ; Tue, 13 Oct 1998 13:02:14 -0700 (PDT) (envelope-from cdematt@rush.aero.org) Received: from rush.aero.org ([130.221.201.83]) by aero.org with ESMTP id <111228-3>; Tue, 13 Oct 1998 13:01:46 -0700 Received: (from cdematt@localhost) by rush.aero.org (8.8.5/8.8.5) id NAA01194; Tue, 13 Oct 1998 13:01:42 -0700 (PDT) From: Cheryl DeMatteis Message-Id: <199810132001.NAA01194@rush.aero.org> Subject: trap in /bin/sh To: freebsd-questions@FreeBSD.ORG Date: Tue, 13 Oct 1998 13:01:42 -0700 Cc: steve@isi.edu X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm having trouble with the trap command in /bin/sh on FreeBSD 2.2.7-STABLE #0: here's an example: file: test.sh #! /bin/sh trap "echo hello" TERM ./loop.sh & echo "myself $$" echo "subshell $!" wait $! file: loop.sh #! /bin/sh while [ 1 ] ; do echo "hello" > /dev/null done When starting test.sh, I get no response when I kill -TERM either the parent or the subshell. This works on a Solaris box. Thanks for any suggestions you might have. Cheryl -- Cheryl K. DeMatteis The Aerospace Corporation, M1/102 cdematt@aero.org Computer Science and Technology (310)336-1189 2350 E. El Segundo Blvd. (310)336-4402 (fax) El Segundo, CA 90245-4691 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message