From owner-freebsd-hackers@FreeBSD.ORG Tue May 11 00:22:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61FFE16A4CE for ; Tue, 11 May 2004 00:22:36 -0700 (PDT) Received: from cgp.dol.ru (spiritus.dol.ru [194.87.5.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17FB843D2F for ; Tue, 11 May 2004 00:22:35 -0700 (PDT) (envelope-from mitya@sinbin.demos.su) Received: from [194.87.5.31] (HELO sinbin.demos.su) by cgp.dol.ru (CommuniGate Pro SMTP 4.1.8/D2) with ESMTP-TLS id 163799957; Tue, 11 May 2004 11:22:33 +0400 Received: from sinbin.demos.su by sinbin.demos.su with ESMTPœ id i4B7MURe019603; (8.12.11/D) Tue, 11 May 2004 11:22:30 +0400 (MSD) Received: (from mitya@localhost) by sinbin.demos.su (8.12.11/8.12.11/Submit) id i4B7MUU3019593; Tue, 11 May 2004 11:22:30 +0400 (MSD) (envelope-from mitya) Date: Tue, 11 May 2004 11:22:30 +0400 From: Dmitry Sivachenko To: Martin Cracauer Message-ID: <20040511072230.GA63238@sinbin.demos.su> References: <20040430112829.GA93243@sinbin.demos.su> <20040509215350.A79087@cons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20040509215350.A79087@cons.org> WWW-Home-Page: http://mitya.pp.ru/ X-PGP-Key: http://mitya.pp.ru/mitya.asc User-Agent: Mutt/1.5.6i cc: hackers@FreeBSD.org Subject: Re: /bin/sh question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2004 07:22:36 -0000 On Sun, May 09, 2004 at 09:53:50PM -0400, Martin Cracauer wrote: > Dmitry Sivachenko wrote on Fri, Apr 30, 2004 at 03:28:29PM +0400: > > > > We use recent -STABLE. > > We observed /bin/sh looping forever executing a script. > > We run this script with -T option to sh(1). > > When sh(1) receives a HUP, we entering our trap handler which spawns > > child process. When this process exits, sh(1) loops. > > Need a test script. I committed a bogus change some time ago but that > never made it into -stable, except maybe somebody else merged :-/ > > I am not sure you are allowed to fork in a trap handler, can't check > right now. > A simple test script is provided in bin/66242.