Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh hangs on IRIX 5.2 / me to: (SunOS4.1.3 + Solaris 2.4)
- X-seq: zsh-workers 859
- From: braemer@xxxxxxxxxxxxxxxxxxxxxxxxxxx (Achim Braemer)
- To: "Bas V. de Bakker" <bas@xxxxxxxxxxxx>
- Subject: Re: zsh hangs on IRIX 5.2 / me to: (SunOS4.1.3 + Solaris 2.4)
- Date: Tue, 26 Mar 96 19:19:20 +0100
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199603261244.HAA16513@xxxxxxxxxxxxxxxxxxxxxxxx>
- References: <m0u0Eko-00080xC@xxxxxxxxxxxxxxxxxxxxxxxxx> <9603251055.AA15871@xxxxxxxxxxxx> <9603261132.AA00834@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <199603261244.HAA16513@xxxxxxxxxxxxxxxxxxxxxxxx>
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 <pid>"?
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 --
Messages sorted by:
Reverse Date,
Date,
Thread,
Author