From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11463 invoked from network); 25 Feb 2003 00:39:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 25 Feb 2003 00:39:10 -0000 Received: (qmail 15791 invoked by alias); 25 Feb 2003 00:39:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18284 Received: (qmail 15784 invoked from network); 25 Feb 2003 00:39:01 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 25 Feb 2003 00:39:01 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [216.27.190.146] by sunsite.dk (MessageWall 1.0.8) with SMTP; 25 Feb 2003 0:39:1 -0000 Received: from ceramic.fifi.org (mail@ceramic.fifi.org [216.27.190.147]) by tantale.fifi.org (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id QAA01427; Mon, 24 Feb 2003 16:38:59 -0800 Received: from phil by ceramic.fifi.org with local (Exim 3.35 #1 (Debian)) id 18nT7a-0007EC-00; Mon, 24 Feb 2003 16:38:58 -0800 To: "Bart Schaefer" Cc: zsh-workers@sunsite.dk Subject: Re: Cant fg a suspended su (4.1.0-dev-7) References: <200302211807.h1LI74n23531@aragorn.cortexmachina.com> <1030222230416.ZM10265@candle.brasslantern.com> From: Philippe Troin Date: 24 Feb 2003 16:38:58 -0800 In-Reply-To: <1030222230416.ZM10265@candle.brasslantern.com> Message-ID: <87n0kl19el.fsf@ceramic.fifi.org> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Philippe Troin "Bart Schaefer" writes: > On Feb 21, 1:07pm, Peter Whaite wrote: > } > } I've noticed that I cannot resume a suspened su session lately (It > } happened in 4.1.0-dev-6 as well). > } > } There is approximately a 1 second pause between the contined and the > } suspended messages. > } > } Any idea why the su command re-suspends after the continue? > > It appears to be this loop in bin_suspend(): > > 1669 if (jobbing) { > 1670 /* stay suspended */ > 1671 while (gettygrp() != mypgrp) { > 1672 sleep(1); > 1673 if (gettygrp() != mypgrp) > 1674 kill(0, SIGTTIN); > 1675 } > 1676 /* restore signal handling */ > 1677 signal_ignore(SIGTTOU); > 1678 signal_ignore(SIGTSTP); > 1679 signal_ignore(SIGTTIN); > 1680 } > > However, that code has been there forever [*] so the actual problem must > lie in some change that's been made to tty process group handling. I > would tend to suspect that zsh-workers/17859 is the culprit. Since I'm the author of the patch in zsh-workers/17859, I'm having a look at it... The above busy loop seems quite awful to me... But I'm looking into the problem. Phil.