From owner-freebsd-hackers@FreeBSD.ORG Sun May 9 18:53:55 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 AA26416A4CE for ; Sun, 9 May 2004 18:53:55 -0700 (PDT) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7A5643D2D for ; Sun, 9 May 2004 18:53:54 -0700 (PDT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper [212.12.50.230]) by schlepper.zs64.net (8.12.10/8.11.1) with ESMTP id i4A1rp7D079155; Mon, 10 May 2004 03:53:51 +0200 (CEST) (envelope-from cracauer@schlepper.zs64.net) Received: (from cracauer@localhost) by schlepper.zs64.net (8.12.10/8.12.9/Submit) id i4A1rpr4079154; Sun, 9 May 2004 21:53:51 -0400 (EDT) Date: Sun, 9 May 2004 21:53:50 -0400 From: Martin Cracauer To: Dmitry Sivachenko Message-ID: <20040509215350.A79087@cons.org> References: <20040430112829.GA93243@sinbin.demos.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20040430112829.GA93243@sinbin.demos.su>; from mitya@cavia.pp.ru on Fri, Apr 30, 2004 at 03:28:29PM +0400 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: Mon, 10 May 2004 01:53:55 -0000 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. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ No warranty. This email is probably produced by one of my cats stepping on the keys. No, I don't have an infinite number of cats.