Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs



On Mon, 30 Jul 2001 14:24:25 -0700, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > > However, I note that in -pws-2, both `cat' and `ls' are in the same pgrp
> > > but it is `ls' that is stopped.  Did you try either of the patches that
> > > Sven sent?
> > 
> > Yes, and even sent out a reply (Jul 6)
> 
> No, Sven sent two *more* patches *after* that.  July 11 -- see
> 
> 	http://www.zsh.org/mla/workers/2001/msg02043.html
> 
> Those are the ones that I was asking about.

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.

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).

At any rate, here's the result:

initial
  F S      UID   PID  PPID  PGID   SID  C PRI NI  P    SZ:RSS      WCHAN    STIME TTY     TIME CMD
 b0 S      tsm 19496   915 19496   915  5  28 20  *   593:218   8039e0b0 17:58:33 ttyq4   0:00 ./Src/zsh +Z -f 

running
 b8 R      tsm 19498 19496 19498   915 30  20 20  *   394:114          - 17:58:54 ttyq4   0:00 ls -lR / 
 b0 S      tsm 19496   915 19496   915  0  39 20  *   609:232   8039d510 17:58:33 ttyq4   0:00 ./Src/zsh +Z -f 
 b0 S      tsm 19499 19496 19498   915  3  61 20  *    45:25    c252c13c 17:58:54 ttyq4   0:00 cat 

^Z
 b0 T      tsm 19498 19496 19498   915  0  60 20  *   394:114          - 17:58:54 ttyq4   0:01 ls -lR / 
 b0 S      tsm 19496   915 19496   915  0  28 20  *   609:235   8039e0b0 17:58:33 ttyq4   0:00 ./Src/zsh +Z -f 
 b0 S      tsm 19499 19496 19498   915  0  60 20  *    45:25    c252c13c 17:58:54 ttyq4   0:00 cat 

I actually get back to a live prompt this time. Typing fg:
 b0 R      tsm 19498 19496 19498   915 20  70 20  *   394:114          - 17:58:54 ttyq4   0:01 ls -lR / 
 b0 S      tsm 19496   915 19496   915  0  39 20  *   609:238   8039d510 17:58:33 ttyq4   0:00 ./Src/zsh +Z -f 
 b0 S      tsm 19499 19496 19498   915  2  61 20  *    45:25    c252c13c 17:58:54 ttyq4   0:00 cat 

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).

-----
For completeness, I also looked at the results of the other two patch
combinations.
-----
both patches applied:
initial
 b0 S      tsm 19575   915 19575   915  1  28 20  *   593:218   8039e0b0 18:02:00 ttyq4   0:00 ./Src/zsh +Z -f 

running
 b0 R      tsm 19577 19575 19577   915 41  80 20  *   394:114          - 18:02:10 ttyq4   0:01 ls -lR / 
 b0 S      tsm 19575   915 19575   915  6  39 20  *   609:232   8039d510 18:02:00 ttyq4   0:00 ./Src/zsh +Z -f 
 b0 S      tsm 19578 19575 19577   915  2  61 20  *    45:25    c252c13c 18:02:10 ttyq4   0:00 cat 

^Z
 b0 T      tsm 19577 19575 19577   915  0  60 20  *   449:171          - 18:02:10 ttyq4   0:02 ls -lR / 
 b0 S      tsm 19575   915 19575   915  0  28 20  *   609:235   8039e0b0 18:02:00 ttyq4   0:00 ./Src/zsh +Z -f 
 b0 S      tsm 19578 19575 19577   915  0  60 20  *    45:25    c252c13c 18:02:10 ttyq4   0:00 cat 

still get a prompt, typing fg
 b0 R      tsm 19577 19575 19577   915 46  83 20  *   457:177          - 18:02:10 ttyq4   0:02 ls -lR / 
 b0 S      tsm 19575   915 19575   915  0  39 20  *   609:238   8039d510 18:02:00 ttyq4   0:00 ./Src/zsh +Z -f 
 b0 S      tsm 19578 19575 19577   915  3  61 20  *    45:25    c252c13c 18:02:10 ttyq4   0:00 cat 

etc, continues to work.

----
second patch without first:
initial
 b0 S      tsm 19649   915 19649   915  0  28 20  *   593:218   8039e0b0 18:04:02 ttyq4   0:00 ./Src/zsh +Z -f 

running
 b0 R      tsm 19651 19649 19651   915 33  76 20  *   394:114          - 18:04:14 ttyq4   0:00 ls -lR / 
 b0 S      tsm 19649   915 19649   915  0  39 20  *   609:232   8039d510 18:04:02 ttyq4   0:00 ./Src/zsh +Z -f 
 b0 S      tsm 19652 19649 19652   915  1  60 20  *    45:25    c252c13c 18:04:14 ttyq4   0:00 cat 

^Z
 b0 S      tsm 19651 19649 19651   915  0  60 20  *   447:169   c252c140 18:04:14 ttyq4   0:01 ls -lR / 
 b0 S      tsm 19649   915 19649   915  0  39 20  *   609:233   8039d510 18:04:02 ttyq4   0:00 ./Src/zsh +Z -f 
 b0 T      tsm 19652 19649 19652   915  0  60 20  *    45:25           - 18:04:14 ttyq4   0:00 cat 

and with this patch configuration, it hangs here.

   Tim



Messages sorted by: Reverse Date, Date, Thread, Author