From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11486 invoked from network); 31 Jul 2001 08:21:55 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Jul 2001 08:21:55 -0000 Received: (qmail 11121 invoked by alias); 31 Jul 2001 08:21:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15547 Received: (qmail 11108 invoked from network); 31 Jul 2001 08:21:41 -0000 From: Sven Wischnowsky Date: Tue, 31 Jul 2001 10:20:57 +0200 (MET DST) Message-Id: <200107310820.KAA02935@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk CC: Timothy Miller Subject: Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs In-Reply-To: Timothy Miller wrote: > ... > > Ah. He didn't send them to me (just the list, from examining the headers), > so of course I didn't get or try them. Sorry. > exec.c patch: > > The line number given in this patch is 9 more than the corresponding line in > the zsh-4.0.2 source file I have, just as a note. > > Incidentally, according to the irix man page for killpg, you're supposed to > #define _BSD_SIGNALS or _BSD_COMPAT before signal.h to use it; zsh appears > to use BSD_SIGNALS (not _BSD_SIGNALS) in configure. However, it still uses > BSD_SIGNALS in -pws-2. Further, if I take the cc command line for exec.c, > change cc to gcc, -c to -E, remove -o exec.o, and add -dD to get the macro > definitions in place, then it looks like none of these *BSD* symbols are > defined anywhere. The man page also says using BSD and SYSV facilities in > the same program is strongly discouraged and will result in unpredictable > behavior, in case you weren't aware (I don't know if zsh does that). Aha. Hm, well, is there any Unix where killpg(p, s) does something different than kill(-p, s)? If not, we could either change all places where we use killpg() or just add a killpg macro to zsh.h or signals.h. > ... > > So it looks like this patch fixes the hanging problem, except that cat still > isn't stopped (it is when I do the same test under solaris with 4.0.1). Yes, it's a lot better already. You could test if modifying the line I changed to use kill() instead of killpg() to: kill(-jobtab[list_pipe_job].gleader, 0) == -1) { fixes the problem with cat not being stopped. (I've only inserted a `-' before the `jobtab[...]' here.) Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de