From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15188 invoked from network); 22 Mar 2001 01:02:10 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Mar 2001 01:02:10 -0000 Received: (qmail 27195 invoked by alias); 22 Mar 2001 01:02:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13696 Received: (qmail 27165 invoked from network); 22 Mar 2001 01:02:02 -0000 From: "Bart Schaefer" Message-Id: <1010322010138.ZM19106@candle.brasslantern.com> Date: Thu, 22 Mar 2001 01:01:38 +0000 In-Reply-To: Comments: In reply to Ryan Richter "zsh bug-hang on startup after exec" (Mar 21, 1:25pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: bobort@bigfoot.com, zsh-workers@sunsite.auc.dk Subject: Re: zsh bug-hang on startup after exec MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 21, 1:25pm, Ryan Richter wrote: } Subject: zsh bug-hang on startup after exec } } I had been using bash as my login shell, and had it set up to exec } zsh. I just upgraded zsh from 3.1.6 to 3.1.9, and when I log in, zsh } hangs immediately after being execed, before it even processes the } startup scripts. The strace output shows that it's getting stuck in this loop in init.c: while ((ttpgrp = gettygrp()) != -1 && ttpgrp != mypgrp) { sleep(1); /* give parent time to change pgrp */ mypgrp = GETPGRP(); if (mypgrp == mypid) attachtty(mypgrp); if (mypgrp == gettygrp()) break; killpg(mypgrp, SIGTTIN); mypgrp = GETPGRP(); } Why zsh is not becoming the process group leader, I don't know. Obviously bash must be exec'ing it before making *itself* the process group leader, but then who *is* the group leader, a? Note that getpid() = 20122 getpgrp() = 20120 ioctl(10, TIOCGPGRP, [20121]) = 0 So there are at least three processes involved here ... the process group leader is 20120 (whatever that was), but the tty group leader is 20121, and neither of those is zsh (20122), so (mypgrp == mypid) is never going to be true. } Anyway, this is a linux 2.2.19 i686 system with glibc 2.1.3, and zsh was } compiled with egcs 1.1.2. Why does everyone always identify their Linux system by kernel version and glibc version? That's almost never enough information. The vendor (e.g. redhat) and vendor's version number (e.g. 7.1) are almost always much more useful. In this case it'd also be nice to know how you're logging in; is it on the text console? Remote shell? XDM console? If the latter, are you using vanilla XDM, KDE, Gnome, or something else? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net