From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id FAA24139 for ; Wed, 27 Mar 1996 05:38:23 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA20759; Tue, 26 Mar 1996 13:20:30 -0500 (EST) Resent-Date: Tue, 26 Mar 1996 13:20:30 -0500 (EST) Date: Tue, 26 Mar 96 19:19:20 +0100 From: braemer@doc.physi.uni-heidelberg.de (Achim Braemer) Message-Id: <9603261819.AA02993@doc.physi.uni-heidelberg.de> To: "Bas V. de Bakker" Cc: zsh-workers@math.gatech.edu Subject: Re: zsh hangs on IRIX 5.2 / me to: (SunOS4.1.3 + Solaris 2.4) In-Reply-To: <199603261244.HAA16513@euclid.skiles.gatech.edu> References: <9603251055.AA15871@hydra.ifh.de> <9603261132.AA00834@doc.physi.uni-heidelberg.de> <199603261244.HAA16513@euclid.skiles.gatech.edu> Resent-Message-ID: <"hJ-tf3.0.H45.kL3Mn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/859 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Bas V. de Bakker writes on March 26: > Surely it shouldn't be a problem to find out where a program loops? > That's what debuggers are for. Have you tried "gdb zsh "? Thank you very much, I really didn't know of this possibility. I used dbx and found out that the loop occurs in utils.c: /* give the tty to some process */ /**/ void attachtty(pid_t pgrp) { static int ep = 0; if (jobbing) { #ifdef HAVE_TCSETPGRP if (SHTTY != -1 && tcsetpgrp(SHTTY, pgrp) == -1 && !ep) #else # if ardent if (SHTTY != -1 && setpgrp() == -1 && !ep) # else int arg = pgrp; if (SHTTY != -1 && ioctl(SHTTY, TIOCSPGRP, &arg) == -1 && !ep) # endif #endif { if (kill(pgrp, 0) == -1) attachtty(mypgrp); <=============== else { zerr("can't set tty pgrp: %e", NULL, errno); fflush(stderr); opts[MONITOR] = OPT_UNSET; ep = 1; errflag = 0; } } } } I marked the line that I find suspicious. After I simply commented out this line the hangups didn't occur anymore. Does that help the experts to figure out the problem? Please tell me if you need more information. And thanks for the help! -- Achim --