* fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs @ 2001-06-11 15:11 Timothy Miller 2001-06-12 8:15 ` Sven Wischnowsky 0 siblings, 1 reply; 25+ messages in thread From: Timothy Miller @ 2001-06-11 15:11 UTC (permalink / raw) To: zsh-workers [-- Attachment #1: Type: text/plain, Size: 595 bytes --] I continue to not be a subscriber to this list :-) If I invoke zsh as "zsh-4.0.1 -f" and then run "ls -l|less" on irix 6.3 or 6.5, control-z to suspend, and then "fg" to resume, the shell prints out [1] + done ls -l | continued less and then hangs, unresponsive to all input (ctrl-c, ctrl-z, ctrl-\, other keys, etc). I include the results of Util/reporter at the end of this email. This bug does not happen on Solaris 2.7, AIX 4.3.2, or redhat 7.0 linux 2.2.16. The version of less I'm using is 290 on irix 6.3 and 332 on irix 6.5, solaris, and ix, and 358 on linux. Tim [-- Attachment #2: . ./Util/reporter --] [-- Type: application/octet-stream, Size: 16661 bytes --] # START zsh saveset # uname: IRIX water 6.3 12161207 IP32 # Aliases. alias run-help=man alias which-command=whence # Key bindings. bindkey -N emacs bindkey -N main bindkey -N vicmd bindkey -N viins bindkey -M emacs "^@" set-mark-command bindkey -M emacs "^A" beginning-of-line bindkey -M emacs "^B" backward-char bindkey -M emacs "^D" delete-char-or-list bindkey -M emacs "^E" end-of-line bindkey -M emacs "^F" forward-char bindkey -M emacs "^G" send-break bindkey -M emacs "^H" backward-delete-char bindkey -M emacs "^I" expand-or-complete bindkey -M emacs "^J" accept-line bindkey -M emacs "^K" kill-line bindkey -M emacs "^L" clear-screen bindkey -M emacs "^M" accept-line bindkey -M emacs "^N" down-line-or-history bindkey -M emacs "^O" accept-line-and-down-history bindkey -M emacs "^P" up-line-or-history bindkey -M emacs "^Q" push-line bindkey -M emacs "^R" history-incremental-search-backward bindkey -M emacs "^S" history-incremental-search-forward bindkey -M emacs "^T" transpose-chars bindkey -M emacs "^U" kill-whole-line bindkey -M emacs "^V" quoted-insert bindkey -M emacs "^W" backward-kill-word bindkey -M emacs "^X^B" vi-match-bracket bindkey -M emacs "^X^F" vi-find-next-char bindkey -M emacs "^X^J" vi-join bindkey -M emacs "^X^K" kill-buffer bindkey -M emacs "^X^N" infer-next-history bindkey -M emacs "^X^O" overwrite-mode bindkey -M emacs "^X^U" undo bindkey -M emacs "^X^V" vi-cmd-mode bindkey -M emacs "^X^X" exchange-point-and-mark bindkey -M emacs "^X*" expand-word bindkey -M emacs "^X=" what-cursor-position bindkey -M emacs "^XG" list-expand bindkey -M emacs "^Xg" list-expand bindkey -M emacs "^Xr" history-incremental-search-backward bindkey -M emacs "^Xs" history-incremental-search-forward bindkey -M emacs "^Xu" undo bindkey -M emacs "^Y" yank bindkey -M emacs "^[^D" list-choices bindkey -M emacs "^[^G" send-break bindkey -M emacs "^[^H" backward-kill-word bindkey -M emacs "^[^I" self-insert-unmeta bindkey -M emacs "^[^J" self-insert-unmeta bindkey -M emacs "^[^L" clear-screen bindkey -M emacs "^[^M" self-insert-unmeta bindkey -M emacs "^[^_" copy-prev-word bindkey -M emacs "^[ " expand-history bindkey -M emacs "^[!" expand-history bindkey -M emacs "^[\"" quote-region bindkey -M emacs "^[\$" spell-word bindkey -M emacs "^['" quote-line bindkey -M emacs "^[-" neg-argument bindkey -M emacs "^[." insert-last-word bindkey -M emacs "^[0" digit-argument bindkey -M emacs "^[1" digit-argument bindkey -M emacs "^[2" digit-argument bindkey -M emacs "^[3" digit-argument bindkey -M emacs "^[4" digit-argument bindkey -M emacs "^[5" digit-argument bindkey -M emacs "^[6" digit-argument bindkey -M emacs "^[7" digit-argument bindkey -M emacs "^[8" digit-argument bindkey -M emacs "^[9" digit-argument bindkey -M emacs "^[<" beginning-of-buffer-or-history bindkey -M emacs "^[>" end-of-buffer-or-history bindkey -M emacs "^[?" which-command bindkey -M emacs "^[A" accept-and-hold bindkey -M emacs "^[B" backward-word bindkey -M emacs "^[C" capitalize-word bindkey -M emacs "^[D" kill-word bindkey -M emacs "^[F" forward-word bindkey -M emacs "^[G" get-line bindkey -M emacs "^[H" run-help bindkey -M emacs "^[L" down-case-word bindkey -M emacs "^[N" history-search-forward bindkey -M emacs "^[OA" up-line-or-history bindkey -M emacs "^[OB" down-line-or-history bindkey -M emacs "^[OC" forward-char bindkey -M emacs "^[OD" backward-char bindkey -M emacs "^[P" history-search-backward bindkey -M emacs "^[Q" push-line bindkey -M emacs "^[S" spell-word bindkey -M emacs "^[T" transpose-words bindkey -M emacs "^[U" up-case-word bindkey -M emacs "^[W" copy-region-as-kill bindkey -M emacs "^[[A" up-line-or-history bindkey -M emacs "^[[B" down-line-or-history bindkey -M emacs "^[[C" forward-char bindkey -M emacs "^[[D" backward-char bindkey -M emacs "^[_" insert-last-word bindkey -M emacs "^[a" accept-and-hold bindkey -M emacs "^[b" backward-word bindkey -M emacs "^[c" capitalize-word bindkey -M emacs "^[d" kill-word bindkey -M emacs "^[f" forward-word bindkey -M emacs "^[g" get-line bindkey -M emacs "^[h" run-help bindkey -M emacs "^[l" down-case-word bindkey -M emacs "^[n" history-search-forward bindkey -M emacs "^[p" history-search-backward bindkey -M emacs "^[q" push-line bindkey -M emacs "^[s" spell-word bindkey -M emacs "^[t" transpose-words bindkey -M emacs "^[u" up-case-word bindkey -M emacs "^[w" copy-region-as-kill bindkey -M emacs "^[x" execute-named-cmd bindkey -M emacs "^[y" yank-pop bindkey -M emacs "^[z" execute-last-named-cmd bindkey -M emacs "^[|" vi-goto-column bindkey -M emacs "^[^?" backward-kill-word bindkey -M emacs "^_" undo bindkey -R -M emacs " "-"~" self-insert bindkey -M emacs "^?" backward-delete-char bindkey -R -M emacs "\M-^@"-"\M-^?" self-insert bindkey "^@" set-mark-command bindkey "^A" beginning-of-line bindkey "^B" backward-char bindkey "^D" delete-char-or-list bindkey "^E" end-of-line bindkey "^F" forward-char bindkey "^G" send-break bindkey "^H" backward-delete-char bindkey "^I" expand-or-complete bindkey "^J" accept-line bindkey "^K" kill-line bindkey "^L" clear-screen bindkey "^M" accept-line bindkey "^N" down-line-or-history bindkey "^O" accept-line-and-down-history bindkey "^P" up-line-or-history bindkey "^Q" push-line bindkey "^R" history-incremental-search-backward bindkey "^S" history-incremental-search-forward bindkey "^T" transpose-chars bindkey "^U" kill-whole-line bindkey "^V" quoted-insert bindkey "^W" backward-kill-word bindkey "^X^B" vi-match-bracket bindkey "^X^F" vi-find-next-char bindkey "^X^J" vi-join bindkey "^X^K" kill-buffer bindkey "^X^N" infer-next-history bindkey "^X^O" overwrite-mode bindkey "^X^U" undo bindkey "^X^V" vi-cmd-mode bindkey "^X^X" exchange-point-and-mark bindkey "^X*" expand-word bindkey "^X=" what-cursor-position bindkey "^XG" list-expand bindkey "^Xg" list-expand bindkey "^Xr" history-incremental-search-backward bindkey "^Xs" history-incremental-search-forward bindkey "^Xu" undo bindkey "^Y" yank bindkey "^[^D" list-choices bindkey "^[^G" send-break bindkey "^[^H" backward-kill-word bindkey "^[^I" self-insert-unmeta bindkey "^[^J" self-insert-unmeta bindkey "^[^L" clear-screen bindkey "^[^M" self-insert-unmeta bindkey "^[^_" copy-prev-word bindkey "^[ " expand-history bindkey "^[!" expand-history bindkey "^[\"" quote-region bindkey "^[\$" spell-word bindkey "^['" quote-line bindkey "^[-" neg-argument bindkey "^[." insert-last-word bindkey "^[0" digit-argument bindkey "^[1" digit-argument bindkey "^[2" digit-argument bindkey "^[3" digit-argument bindkey "^[4" digit-argument bindkey "^[5" digit-argument bindkey "^[6" digit-argument bindkey "^[7" digit-argument bindkey "^[8" digit-argument bindkey "^[9" digit-argument bindkey "^[<" beginning-of-buffer-or-history bindkey "^[>" end-of-buffer-or-history bindkey "^[?" which-command bindkey "^[A" accept-and-hold bindkey "^[B" backward-word bindkey "^[C" capitalize-word bindkey "^[D" kill-word bindkey "^[F" forward-word bindkey "^[G" get-line bindkey "^[H" run-help bindkey "^[L" down-case-word bindkey "^[N" history-search-forward bindkey "^[OA" up-line-or-history bindkey "^[OB" down-line-or-history bindkey "^[OC" forward-char bindkey "^[OD" backward-char bindkey "^[P" history-search-backward bindkey "^[Q" push-line bindkey "^[S" spell-word bindkey "^[T" transpose-words bindkey "^[U" up-case-word bindkey "^[W" copy-region-as-kill bindkey "^[[A" up-line-or-history bindkey "^[[B" down-line-or-history bindkey "^[[C" forward-char bindkey "^[[D" backward-char bindkey "^[_" insert-last-word bindkey "^[a" accept-and-hold bindkey "^[b" backward-word bindkey "^[c" capitalize-word bindkey "^[d" kill-word bindkey "^[f" forward-word bindkey "^[g" get-line bindkey "^[h" run-help bindkey "^[l" down-case-word bindkey "^[n" history-search-forward bindkey "^[p" history-search-backward bindkey "^[q" push-line bindkey "^[s" spell-word bindkey "^[t" transpose-words bindkey "^[u" up-case-word bindkey "^[w" copy-region-as-kill bindkey "^[x" execute-named-cmd bindkey "^[y" yank-pop bindkey "^[z" execute-last-named-cmd bindkey "^[|" vi-goto-column bindkey "^[^?" backward-kill-word bindkey "^_" undo bindkey -R " "-"~" self-insert bindkey "^?" backward-delete-char bindkey -R "\M-^@"-"\M-^?" self-insert bindkey -a "^D" list-choices bindkey -a "^G" list-expand bindkey -a "^H" vi-backward-char bindkey -a "^J" accept-line bindkey -a "^L" clear-screen bindkey -a "^M" accept-line bindkey -a "^N" down-history bindkey -a "^P" up-history bindkey -a "^R" redisplay bindkey -a "^[OA" up-line-or-history bindkey -a "^[OB" down-line-or-history bindkey -a "^[OC" vi-forward-char bindkey -a "^[OD" vi-backward-char bindkey -a "^[[A" up-line-or-history bindkey -a "^[[B" down-line-or-history bindkey -a "^[[C" vi-forward-char bindkey -a "^[[D" vi-backward-char bindkey -a " " vi-forward-char bindkey -a "\"" vi-set-buffer bindkey -a "#" pound-insert bindkey -a "\$" vi-end-of-line bindkey -a "%" vi-match-bracket bindkey -a "'" vi-goto-mark-line bindkey -a "+" vi-down-line-or-history bindkey -a "," vi-rev-repeat-find bindkey -a -- "-" vi-up-line-or-history bindkey -a "." vi-repeat-change bindkey -a "/" vi-history-search-backward bindkey -a "0" vi-digit-or-beginning-of-line bindkey -R -a "1"-"9" digit-argument bindkey -a ";" vi-repeat-find bindkey -a "<" vi-unindent bindkey -a "=" list-choices bindkey -a ">" vi-indent bindkey -a "?" vi-history-search-forward bindkey -a "A" vi-add-eol bindkey -a "B" vi-backward-blank-word bindkey -a "C" vi-change-eol bindkey -a "D" vi-kill-eol bindkey -a "E" vi-forward-blank-word-end bindkey -a "F" vi-find-prev-char bindkey -a "G" vi-fetch-history bindkey -a "I" vi-insert-bol bindkey -a "J" vi-join bindkey -a "N" vi-rev-repeat-search bindkey -a "O" vi-open-line-above bindkey -a "P" vi-put-before bindkey -a "R" vi-replace bindkey -a "S" vi-change-whole-line bindkey -a "T" vi-find-prev-char-skip bindkey -a "W" vi-forward-blank-word bindkey -a "X" vi-backward-delete-char bindkey -a "Y" vi-yank-whole-line bindkey -a "\^" vi-first-non-blank bindkey -a "\`" vi-goto-mark bindkey -a "a" vi-add-next bindkey -a "b" vi-backward-word bindkey -a "c" vi-change bindkey -a "d" vi-delete bindkey -a "e" vi-forward-word-end bindkey -a "f" vi-find-next-char bindkey -a "h" vi-backward-char bindkey -a "i" vi-insert bindkey -a "j" down-line-or-history bindkey -a "k" up-line-or-history bindkey -a "l" vi-forward-char bindkey -a "m" vi-set-mark bindkey -a "n" vi-repeat-search bindkey -a "o" vi-open-line-below bindkey -a "p" vi-put-after bindkey -a "r" vi-replace-chars bindkey -a "s" vi-substitute bindkey -a "t" vi-find-next-char-skip bindkey -a "u" vi-undo-change bindkey -a "w" vi-forward-word bindkey -a "x" vi-delete-char bindkey -a "y" vi-yank bindkey -a "|" vi-goto-column bindkey -a "~" vi-swap-case bindkey -a "^?" vi-backward-char bindkey -R -M viins "^A"-"^C" self-insert bindkey -M viins "^D" list-choices bindkey -R -M viins "^E"-"^F" self-insert bindkey -M viins "^G" list-expand bindkey -M viins "^H" vi-backward-delete-char bindkey -M viins "^I" expand-or-complete bindkey -M viins "^J" accept-line bindkey -M viins "^K" self-insert bindkey -M viins "^L" clear-screen bindkey -M viins "^M" accept-line bindkey -R -M viins "^N"-"^P" self-insert bindkey -M viins "^Q" vi-quoted-insert bindkey -M viins "^R" redisplay bindkey -R -M viins "^S"-"^T" self-insert bindkey -M viins "^U" vi-kill-line bindkey -M viins "^V" vi-quoted-insert bindkey -M viins "^W" vi-backward-kill-word bindkey -R -M viins "^X"-"^Z" self-insert bindkey -M viins "^[" vi-cmd-mode bindkey -M viins "^[OA" up-line-or-history bindkey -M viins "^[OB" down-line-or-history bindkey -M viins "^[OC" vi-forward-char bindkey -M viins "^[OD" vi-backward-char bindkey -M viins "^[[A" up-line-or-history bindkey -M viins "^[[B" down-line-or-history bindkey -M viins "^[[C" vi-forward-char bindkey -M viins "^[[D" vi-backward-char bindkey -R -M viins "^\\\\"-"~" self-insert bindkey -M viins "^?" vi-backward-delete-char bindkey -R -M viins "\M-^@"-"\M-^?" self-insert # Completions. compctl -C -c -tn compctl -D -f -tn compctl -T # Undefined functions. # Defined functions. # Limits. limit datasize 2048MB limit stacksize 64MB limit coredumpsize 0kB limit descriptors 200 limit vmemorysize 2048MB limit resident 115MB # Modules. zmodload -d zsh/zutil zsh/complete zmodload -d zsh/compctl zsh/complete zsh/zle zmodload -d zsh/complete zsh/zle zmodload -d zsh/complist zsh/complete zsh/zle zmodload -d zsh/computil zsh/complete zsh/zle zmodload -d zsh/zleparameter zsh/zle zmodload -ab zsh/computil compfiles zmodload -ab zsh/sched sched zmodload -ab zsh/zutil zparseopts zmodload -ab zsh/computil comptags zmodload -ab zsh/computil compdescribe zmodload -ab zsh/zutil zregexparse zmodload -ab zsh/computil comparguments zmodload -ab zsh/zutil zstyle zmodload -ab zsh/computil comptry zmodload -ab zsh/computil compvalues zmodload -ab zsh/computil compgroups zmodload -ab zsh/termcap echotc zmodload -ab zsh/terminfo echoti zmodload -ab zsh/computil compquote zmodload -ab zsh/zutil zformat zmodload -ap zsh/parameter aliases zmodload -ap zsh/parameter builtins zmodload -ap zsh/parameter commands zmodload -ap zsh/parameter dirstack zmodload -ap zsh/parameter dis_aliases zmodload -ap zsh/parameter dis_builtins zmodload -ap zsh/parameter dis_functions zmodload -ap zsh/parameter dis_galiases zmodload -ap zsh/parameter dis_reswords zmodload -ap zsh/parameter funcstack zmodload -ap zsh/parameter functions zmodload -ap zsh/parameter galiases zmodload -ap zsh/parameter history zmodload -ap zsh/parameter historywords zmodload -ap zsh/parameter jobdirs zmodload -ap zsh/parameter jobstates zmodload -ap zsh/parameter jobtexts zmodload -ap zsh/zleparameter keymaps zmodload -ap zsh/parameter modules zmodload -ap zsh/parameter nameddirs zmodload -ap zsh/parameter options zmodload -ap zsh/parameter parameters zmodload -ap zsh/parameter reswords zmodload -ap zsh/termcap termcap zmodload -ap zsh/terminfo terminfo zmodload -ap zsh/parameter userdirs zmodload -ap zsh/zleparameter widgets zmodload zsh/compctl zmodload zsh/complete zmodload zsh/main zmodload zsh/zle zmodload zsh/rlimits # Non-array variables. ARGC=0 Illegal option -- w Usage: grep -hblcnsvi pattern file ... prompt='test%' # Array variables. argv=() cdpath=('.' '/pro/uga/script' '/map/gfx0/users/tsm/cmucl/local' '/map/gfx0/common/cmucl/src/alpha' '/map/gfx0/common/cmucl/build' '/map/gfx0/common/cmucl' '/pro/uga/megalib' '/pro/uga/pkg' '/pro/uga/cmd') fignore=('') fpath=('/cs/share/zsh/site-functions' '/cs/share/zsh/4.0.1/functions') mailpath=('') manpath=('/cs/man' '/usr/kerberos/man' '/map/gfx0/users/tsm/sgistuff/man' '/usr/man' '/usr/share/man' '/pro/uga/man' '/cs/src/tex/man' '/pro/man' '/usr/freeware/catman' '/usr/catman' '/usr/share/catman' '/usr/local/man' '/cs/data/openinventor/man') module_path=('/cs/lib/zsh/4.0.1') path=('/u/tsm/bin/sgi' '/u/tsm/bin' '/usr/java/bin' '/map/gfx0/users/tsm/sgistuff/bin' '/system/bin' '/cs/bin' '/usr/sbin' '/pro/uga/bin/sgi/O' '/usr/bsd' '/bin' '/cs/bin/gnu' '/usr/local/bin' '/etc' '/pro/uga/admin/bin' '/com/avs/bin' '/usr/bin' '/usr/freeware/bin' '/map/gfx0/common/cmucl/sgi/beta/bin' '/usr/ucb' '/usr/etc' '/usr/bin/X11' '/cs/bin/krb' '/sbin' '/usr/kerberos/bin' '/system/bin/gnu/bin') pipestatus=('0') psvar=('') signals=('EXIT' 'HUP' 'INT' 'QUIT' 'ILL' 'TRAP' 'IOT' 'EMT' 'FPE' 'KILL' 'BUS' 'SEGV' 'SYS' 'PIPE' 'ALRM' 'TERM' 'USR1' 'USR2' 'CLD' 'PWR' 'WINCH' 'URG' 'POLL' 'STOP' 'TSTP' 'CONT' 'TTIN' 'TTOU' 'VTALRM' 'PROF' 'XCPU' 'XFSZ' '32' 'CKPT' '34' '35' '36' '37' '38' '39' '40' '41' '42' '43' '44' '45' '46' 'PTINTR' 'PTRESCHED' 'RTMIN' 'ZERR' 'DEBUG') watch=('') # Exported variables. export ARCH export AVS_PATH export BOOKVIEWER export CDPATH export CMUCLLIB export COLUMNS export DISPLAY export FNORD_PATH export HOME export IMGVIEWER export INDEXPATH export INFOPATH export LANG export LASTLOGIN export LESS export LINES export LOGNAME export LS_COLORS export MAIL export MAILBOXPROG export MANPATH export MAP3270 export MSGVERB export NOMSGLABEL export NOMSGSEVERITY export NPX_PLUGIN_PATH export OLDPWD export PAGER export PATH export PKFONTS export PRINTER export PSVIEWER export PWD export REAL_UGA_ROOT export RMANCONFIG export SHELL export SHLVL export STARTUPSDIR export S_CLEDITOR export TERM export TERMINFO export TEXPKS export TFMFONTS export TZ export UGA_ARCH export UGA_ROOT export USER export USE_VIDEO export WEBBROWSER export WEBEDITOR export WINDOWID export WINEDITOR export XRDBCOMMAND export XUSERFILESEARCHPATH export latex209_inputs export latex2e_inputs export plaintex_inputs # Setopt. setopt norcs # Styles. # END zsh saveset ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-06-11 15:11 fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs Timothy Miller @ 2001-06-12 8:15 ` Sven Wischnowsky 2001-06-12 15:00 ` Timothy Miller 0 siblings, 1 reply; 25+ messages in thread From: Sven Wischnowsky @ 2001-06-12 8:15 UTC (permalink / raw) To: zsh-workers; +Cc: Timothy Miller Timothy Miller wrote: > I continue to not be a subscriber to this list :-) > > If I invoke zsh as "zsh-4.0.1 -f" and then run "ls -l|less" on irix 6.3 > or 6.5, control-z to suspend, and then "fg" to resume, the shell prints out > > [1] + done ls -l | > continued less > > and then hangs, unresponsive to all input (ctrl-c, ctrl-z, ctrl-\, other keys, > etc). I include the results of Util/reporter at the end of this email. This > bug does not happen on Solaris 2.7, AIX 4.3.2, or redhat 7.0 linux 2.2.16. > The version of less I'm using is 290 on irix 6.3 and 332 on irix 6.5, > solaris, and ix, and 358 on linux. Hm, that's weird -- it's not even one of the complicated cases. The reporter output isn't of much help here. Hence some questions: - What does the output of `ps j' (or equivalent, showing pids and parent pids) show when the job hangs? (ps output with signal masks might help, too.) - Have you tried it with earlier versions of zsh? Does it work there? - Does it work if you replace `less' with another program that doesn't program the terminal (so much), e.g. `more' and `cat'? And of course it works under Tru64 Unix, too, so I can't reproduce it... sigh. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-06-12 8:15 ` Sven Wischnowsky @ 2001-06-12 15:00 ` Timothy Miller [not found] ` <1010612154026.ZM24394@candle.brasslantern.com> 2001-06-14 7:32 ` Sven Wischnowsky 0 siblings, 2 replies; 25+ messages in thread From: Timothy Miller @ 2001-06-12 15:00 UTC (permalink / raw) To: Sven Wischnowsky; +Cc: zsh-workers On Tue, 12 Jun 2001 10:15:59 +0200 (MET DST), Sven Wischnowsky <wischnow@informatik.hu-berlin.de> wrote: > Timothy Miller wrote: > > > I continue to not be a subscriber to this list :-) > > > > If I invoke zsh as "zsh-4.0.1 -f" and then run "ls -l|less" on irix 6.3 > > or 6.5, control-z to suspend, and then "fg" to resume, the shell prints out > > > > [1] + done ls -l | > > continued less > > > > and then hangs, unresponsive to all input (ctrl-c, ctrl-z, ctrl-\, other keys, > > etc). I include the results of Util/reporter at the end of this email. This > > bug does not happen on Solaris 2.7, AIX 4.3.2, or redhat 7.0 linux 2.2.16. > > The version of less I'm using is 290 on irix 6.3 and 332 on irix 6.5, > > solaris, and ix, and 358 on linux. > > Hm, that's weird -- it's not even one of the complicated cases. The > reporter output isn't of much help here. Hence some questions: > > - What does the output of `ps j' (or equivalent, showing pids and parent > pids) show when the job hangs? (ps output with signal masks might > help, too.) On irix 6.3 (where there doesn't seem to be any way to get ps to report signal masks): Running zsh 3.1.6 with -f, then ls -l | less with both procs left running, ps -fjl: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 S tsm 13041 12927 13041 12927 0 39 20 * 666:227 8039d510 09:58:18 ttyq10 0:00 zsh-beta -f b0 S tsm 13043 13041 13042 12927 0 28 20 * 450:124 8039dc80 09:58:46 ttyq10 0:00 less after suspend: b0 S tsm 13041 12927 13041 12927 0 28 20 * 666:227 8039dc80 09:58:18 ttyq10 0:00 zsh-beta -f b0 T tsm 13043 13041 13042 12927 0 60 20 * 450:124 - 09:58:46 ttyq10 0:00 less after resume: b0 S tsm 13041 12927 13041 12927 0 39 20 * 666:239 8039d510 09:58:18 ttyq10 0:00 zsh-beta -f b0 S tsm 13043 13041 13042 12927 0 28 20 * 451:125 8039dc80 09:58:46 ttyq10 0:00 less Running zsh 4.0.1 with -f, both procs still running: b0 S tsm 13097 12927 13097 12927 4 39 20 * 722:285 8039d510 10:07:57 ttyq10 0:00 zsh-4.0.1 -f b0 S tsm 13100 13097 13100 12927 0 28 20 * 450:124 8039dc80 10:08:00 ttyq10 0:00 less after suspend: b0 S tsm 13097 12927 13097 12927 0 28 20 * 722:286 8039dc80 10:07:57 ttyq10 0:00 zsh-4.0.1 -f b0 T tsm 13100 13097 13100 12927 0 60 20 * 450:124 - 10:08:00 ttyq10 0:00 less after resume: b0 S tsm 13097 12927 13097 12927 0 39 20 * 722:288 8039d510 10:07:57 ttyq10 0:00 zsh-4.0.1 -f b0 T tsm 13100 13097 13100 12927 0 60 20 * 450:124 - 10:08:00 ttyq10 0:00 less On irix 6.5, zsh 3.1.6, both running: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD 0 S tsm 35634 35740 35634 35740 0 20 20 * 186:131 23f900b8 10:20:30 ttyq4 0:00 zsh-beta -f 0 S tsm 31635 35634 36065 35740 0 20 20 * 130:84 203fe018 10:20:32 ttyq4 0:00 less after suspend: 0 S tsm 35634 35740 35634 35740 0 20 20 * 186:131 203fe018 10:20:30 ttyq4 0:00 zsh-beta -f 40 T tsm 31635 35634 36065 35740 0 20 20 * 131:85 - 10:20:32 ttyq4 0:00 less after resume: 0 S tsm 35634 35740 35634 35740 0 20 20 * 186:134 23f900b8 10:20:30 ttyq4 0:00 zsh-beta -f 0 S tsm 31635 35634 36065 35740 0 20 20 * 131:85 203fe018 10:20:32 ttyq4 0:00 less zsh 4.0.1 both running: 0 S tsm 35817 35740 35817 35740 0 20 20 * 220:145 23f900b8 10:22:06 ttyq4 0:00 zsh-4.0.1 -f 0 S tsm 36183 35817 36183 35740 0 20 20 * 130:84 203fe018 10:22:09 ttyq4 0:00 less after suspend: 0 S tsm 35817 35740 35817 35740 0 20 20 * 220:145 203fe018 10:22:06 ttyq4 0:00 zsh-4.0.1 -f 40 T tsm 36183 35817 36183 35740 0 20 20 * 131:85 - 10:22:09 ttyq4 0:00 less after resume: 0 S tsm 35817 35740 35817 35740 0 20 20 * 220:145 23f900b8 10:22:06 ttyq4 0:00 zsh-4.0.1 -f 40 T tsm 36183 35817 36183 35740 0 20 20 * 131:85 - 10:22:09 ttyq4 0:00 less The odd thing here is the difference in flags and flags behavior between the two machines. The documented meaning for the flags is the same on both machines: F (l) Flags (hexadecimal and additive) associated with the process: 001 Process is a system (resident) process. 002 Process is being traced. 004 Stopped process has been given to parent via wait(2). 008 Process is sleeping at a non-interruptible priority. 010 Process is in core. 020 Process user area is in core. 040 Process has enabled atomic operator emulation. 080 Process in stream poll or select. 100 Process is a kernel thread. >From the evidence, though, I suspect that this is an error for 6.5. On both systems, zsh 4.0.1 was run as a subshell under zsh 3.1.6, hence the different session id. I wrote a small program to get the pending and held signal masks as well as a bit of other information: For irix 6.3, zsh 3.1.6 with -f, at prompt: zsh: no signals held or pending, asleep on syscall 4 while ls -l|less running: zsh: asleep on syscall 166, all signals from 1 to 64 held EXCEPT 1, 9, 18, 23. less: asleep on syscall 4, no signals held or pending after suspend: zsh asleep no syscall 4, no sigs held or pending less: stopped, no sigs after resume: zsh back to while running less back to while running zsh 4.0.1 with -f, at prompt: zsh: asleep on syscall 4 after ls -l|less: zsh: asleep on syscall 166, all sigs from 1 to 64 held except 1, 9, 18, 23. less asleep on syscall 4 after suspend: zsh: asleep on syscall 4 no sigs held or pending less: stopped after resume: zsh: asleep on syscall 166, all sigs 1-64 held except 1, 9, 18, 23. less: stopped The only info I can find on syscall numbers seems to say that they start with 1000, which doesn't seem to be the case, but if I subtract 1000 from them it claims syscall 4 is write() and 166 is poll(). Signal 1 is hup, 9 is kill, 18 is chld, 23 is stop. > - Have you tried it with earlier versions of zsh? Does it work there? Yes, works with 3.1.6, 3.0.6 and all the earlier versions of zsh I've installed on irix (unfortunately I can't recall exactly which). > - Does it work if you replace `less' with another program that doesn't > program the terminal (so much), e.g. `more' and `cat'? more fails as well. I can't type fast enough to suspend cat before it exits! Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
[parent not found: <1010612154026.ZM24394@candle.brasslantern.com>]
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs [not found] ` <1010612154026.ZM24394@candle.brasslantern.com> @ 2001-06-12 16:13 ` Timothy Miller 2001-06-13 3:55 ` Bart Schaefer 0 siblings, 1 reply; 25+ messages in thread From: Timothy Miller @ 2001-06-12 16:13 UTC (permalink / raw) To: Bart Schaefer; +Cc: zsh-workers On Tue, 12 Jun 2001 15:40:26 +0000, "Bart Schaefer" <schaefer@candle.brasslantern.com> wrote: > On Jun 12, 11:00am, Timothy Miller wrote: > } > } I can't type fast enough to suspend cat before it exits! > > Use "ls -lR / | cat" and I bet you'll have time. Yes, I thought of something like that shortly after I sent the email...what comes of sending too rapidly...anyway, if I do that, it hangs on the first suspend. irix 6.3, zsh 4.0.1 -f, ls -lR /|cat, then suspend: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 S tsm 13962 13961 13962 13905 0 60 20 * 394:114 c06afbc0 11:55:29 ttyq13 0:01 ls -lR / b0 T tsm 13963 13961 13963 13905 0 60 20 * 45:25 - 11:55:29 ttyq13 0:00 cat b0 S tsm 13961 13905 13961 13905 0 39 20 * 732:297 8039d510 11:55:26 ttyq13 0:00 zsh-4.0.1 -f zsh asleep syscall 166, all sigs held but 1, 9, 18, 23 ls asleep on syscall 5, no sigs held/pending cat stopped, no sigs held/pending just found more authoritative info on syscall numbers; syscall 4 is read(), syscall 5 is write(), syscall 166 is sigsuspend(), which makes much more sense. Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-06-12 16:13 ` Timothy Miller @ 2001-06-13 3:55 ` Bart Schaefer 2001-07-06 22:40 ` Timothy Miller 0 siblings, 1 reply; 25+ messages in thread From: Bart Schaefer @ 2001-06-13 3:55 UTC (permalink / raw) To: Timothy Miller; +Cc: zsh-workers On Jun 12, 12:13pm, Timothy Miller wrote: } Subject: Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" } } just found more authoritative info on syscall numbers; syscall 4 is read(), } syscall 5 is write(), syscall 166 is sigsuspend(), which makes much more } sense. What output do you get from `egrep 'BROKEN|SIG' config.h` ? -- 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-06-13 3:55 ` Bart Schaefer @ 2001-07-06 22:40 ` Timothy Miller 0 siblings, 0 replies; 25+ messages in thread From: Timothy Miller @ 2001-07-06 22:40 UTC (permalink / raw) To: Bart Schaefer; +Cc: zsh-workers On Wed, 13 Jun 2001 03:55:22 +0000, "Bart Schaefer" <schaefer@candle.brasslantern.com> wrote: > On Jun 12, 12:13pm, Timothy Miller wrote: > } Subject: Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" > } > } just found more authoritative info on syscall numbers; syscall 4 is read(), > } syscall 5 is write(), syscall 166 is sigsuspend(), which makes much more > } sense. > > What output do you get from `egrep 'BROKEN|SIG' config.h` ? I've now switched to zsh-4.0.2 for the irix debugging process, since it came out before I had a chance to look at it again and since I get the same problem with suspending. This is the output I get: #define RETSIGTYPE void /* #undef STAT_MACROS_BROKEN */ /* #undef BROKEN_SIGNED_TO_UNSIGNED_CASTING */ #define POSIX_SIGNALS 1 /* #undef BSD_SIGNALS */ /* #undef SYSV_SIGNALS */ /* #undef NO_SIGNAL_BLOCKING */ /* #undef RLIM_T_IS_UNSIGNED */ /* #undef BROKEN_KILL_ESRCH */ /* #undef BROKEN_POSIX_SIGSUSPEND */ /* #undef BROKEN_TCSETPGRP */ #define HAVE_SIGACTION 1 #define HAVE_SIGBLOCK 1 #define HAVE_SIGHOLD 1 #define HAVE_SIGNGAM 1 #define HAVE_SIGPROCMASK 1 #define HAVE_SIGRELSE 1 #define HAVE_SIGSETMASK 1 Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-06-12 15:00 ` Timothy Miller [not found] ` <1010612154026.ZM24394@candle.brasslantern.com> @ 2001-06-14 7:32 ` Sven Wischnowsky 2001-07-06 22:52 ` Timothy Miller 2001-07-10 15:22 ` Timothy Miller 1 sibling, 2 replies; 25+ messages in thread From: Sven Wischnowsky @ 2001-06-14 7:32 UTC (permalink / raw) To: zsh-workers; +Cc: Timothy Miller [Debugging the execution code is already hard enough on the machine one sits on front of...] Anyway, thanks for your help in trying to find the problem! Timothy Miller wrote: > ... > > F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD > b0 S tsm 13097 12927 13097 12927 4 39 20 * 722:285 8039d510 10:07:57 ttyq10 0:00 zsh-4.0.1 -f > b0 S tsm 13100 13097 13100 12927 0 28 20 * 450:124 8039dc80 10:08:00 ttyq10 0:00 less Ok, here's the reason why the thing can't be put in the foreground. `less' is in its own process group, but should be in the one of the now deceased `ls'. First I though this was some race condition, with the `ls' exiting too fast, but in 14865: > F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD > b0 S tsm 13962 13961 13962 13905 0 60 20 * 394:114 c06afbc0 11:55:29 ttyq13 0:01 ls -lR / > b0 T tsm 13963 13961 13963 13905 0 60 20 * 45:25 - 11:55:29 ttyq13 0:00 cat > b0 S tsm 13961 13905 13961 13905 0 39 20 * 732:297 8039d510 11:55:26 ttyq13 0:00 zsh-4.0.1 -f So the question is why pipeline-tails get their own process group instead of using that of the pipeline leader. We can't easily look at a diff between 3.1.6 and 4.0.1 to find out which change might be causing this because there were so many changes. I can suspect two things: it might be a problem with list_pipe_job or a similar problem to the one on FreeBSD that was fixed by 11247 (which *was* a problem showing the same results). So as a somewhat wild guess, I've build the two patches below -- which are not to be applied by anyone whose zsh is working. If you find the time to try them, I'd like to hear if one of them fixes the problem. The first one reverses 11247 (it's the first one because the problem looks so suspicously similar) and the second one reverses both 14327 and 14503 -- the last changes I made to list_pipe_job. Please try them separately (or one after another and then both of them together). Bye Sven First patch: diff -u -u -r ../ooz/Src/exec.c ./Src/exec.c --- ../ooz/Src/exec.c Thu Jun 14 05:10:12 2001 +++ ./Src/exec.c Thu Jun 14 05:11:14 2001 @@ -2502,8 +2502,8 @@ } } else if (thisjob != -1 && cl) { if (jobtab[list_pipe_job].gleader && (list_pipe || list_pipe_child)) { - if (setpgrp(0L, jobtab[list_pipe_job].gleader) == -1 || - killpg(jobtab[list_pipe_job].gleader, 0) == -1) { + if (killpg(jobtab[list_pipe_job].gleader, 0) == -1 || + setpgrp(0L, jobtab[list_pipe_job].gleader) == -1) { jobtab[list_pipe_job].gleader = jobtab[thisjob].gleader = (list_pipe_child ? mypgrp : getpid()); setpgrp(0L, jobtab[list_pipe_job].gleader); Second patch: diff -u -u -r ../ooz/Src/exec.c ./Src/exec.c --- ../ooz/Src/exec.c Thu Jun 14 05:10:12 2001 +++ ./Src/exec.c Thu Jun 14 05:15:22 2001 @@ -973,19 +973,16 @@ * stopped, the top-level execpline() didn't get the pid for the * sub-shell because it was overwritten. */ if (!pline_level++) { + list_pipe_job = newjob; list_pipe_pid = 0; nowait = 0; simple_pline = (WC_PIPE_TYPE(code) == WC_PIPE_END); - list_pipe_job = newjob; } lastwj = lpforked = 0; execpline2(state, code, how, opipe[0], ipipe[1], last1); pline_level--; if (how & Z_ASYNC) { lastwj = newjob; - - if (thisjob == list_pipe_job) - list_pipe_job = 0; jobtab[thisjob].stat |= STAT_NOSTTY; if (slflags & WC_SUBLIST_COPROC) { zclose(ipipe[1]); -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-06-14 7:32 ` Sven Wischnowsky @ 2001-07-06 22:52 ` Timothy Miller 2001-07-10 15:22 ` Timothy Miller 1 sibling, 0 replies; 25+ messages in thread From: Timothy Miller @ 2001-07-06 22:52 UTC (permalink / raw) To: Sven Wischnowsky; +Cc: zsh-workers On Thu, 14 Jun 2001 09:32:12 +0200 (MET DST), Sven Wischnowsky <wischnow@informatik.hu-berlin.de> wrote: > So as a somewhat wild guess, I've build the two patches below -- which > are not to be applied by anyone whose zsh is working. If you find the > time to try them, I'd like to hear if one of them fixes the problem. > The first one reverses 11247 (it's the first one because the problem > looks so suspicously similar) and the second one reverses both 14327 and > 14503 -- the last changes I made to list_pipe_job. Please try them > separately (or one after another and then both of them together). After a little hiatus I have a little time to look at this again. I've switched to zsh 4.0.2 for debugging the irix problem since the same problem appears there. However, separately or together, the patches don't affect the problem. Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-06-14 7:32 ` Sven Wischnowsky 2001-07-06 22:52 ` Timothy Miller @ 2001-07-10 15:22 ` Timothy Miller 2001-07-10 16:25 ` Bart Schaefer 1 sibling, 1 reply; 25+ messages in thread From: Timothy Miller @ 2001-07-10 15:22 UTC (permalink / raw) To: Sven Wischnowsky; +Cc: zsh-workers On Thu, 14 Jun 2001 09:32:12 +0200 (MET DST), Sven Wischnowsky <wischnow@informatik.hu-berlin.de> wrote: > We can't easily look at a diff between 3.1.6 and 4.0.1 to find out which > change might be causing this because there were so many changes. However, I just went and checked out of the CVS repository version 3.1.9, discovered it had the problem, and eventually narrowed it down to a change between 3.1.6 and 3.1.7. The cvs copy of 3.1.6 works; 3.1.7 doesn't. Does that suggest anything? I think I would be able to automate testing this and write a script to do a binary search between two dates in the cvs repository, except that the two versions seem to be on different branches in many cases so a pure date search wouldn't be correct, and the branching is different in different files so I can't just manually make a sequence of dates and branches to try. Any suggestions as to something else on those lines I might do? Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-10 15:22 ` Timothy Miller @ 2001-07-10 16:25 ` Bart Schaefer 2001-07-10 21:26 ` Timothy Miller 0 siblings, 1 reply; 25+ messages in thread From: Bart Schaefer @ 2001-07-10 16:25 UTC (permalink / raw) To: Timothy Miller; +Cc: zsh-workers On Jul 10, 11:22am, Timothy Miller wrote: } } However, I just went and checked out of the CVS repository version 3.1.9, } discovered it had the problem, and eventually narrowed it down to a change } between 3.1.6 and 3.1.7. Unfortunately, there were a very large number of changes between 3.1.6 and 3.1.7, so that doesn't help very much. } Any suggestions as to something else on those lines I might do? Use the symbolic tags for each of the -dev- releases between 3.1.6 and 3.1.7. In particular (based on scanning ChangeLog for modifications to jobs.c): Does 3.1.6-dev-20 have the bug? (cvs co -rzsh-3-1-6-dev-20) 3.1.6-dev-19? 3.1.6-dev-18? 3.1.6-dev-15? 3.1.6-pws-2? Note that prior to -dev-14, the release have -pws- or -bart- instead of -dev-. Here's the complete list of tags you can try: zsh-3_1_6-dev-22 zsh-3_1_6-dev-21 zsh-3_1_6-dev-20 zsh-3_1_6-dev-19 zsh-3_1_6-dev-18 zsh-3_1_6-dev-17 zsh-3_1_6-dev-16 zsh-3_1_6-dev-15 zsh-3_1_6-dev-14 zsh-3_1_6-pws-13 zsh-3_1_6-pws-12 zsh-3_1_6-pws-11 zsh-3_1_6-pws-10 zsh-3_1_6-pws-9 zsh-3_1_6-bart-8 zsh-3_1_6-bart-7-2 zsh-3_1_6-bart-7 zsh-3_1_6-pws-6 zsh-3_1_6-pws-5 zsh-3_1_6-pws-4 zsh-3_1_6-pws-3 zsh-3_1_6-pws-2 zsh-3_1_6-pws-1 -- 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-10 16:25 ` Bart Schaefer @ 2001-07-10 21:26 ` Timothy Miller 2001-07-10 23:27 ` Bart Schaefer 0 siblings, 1 reply; 25+ messages in thread From: Timothy Miller @ 2001-07-10 21:26 UTC (permalink / raw) To: Bart Schaefer; +Cc: zsh-workers On Tue, 10 Jul 2001 16:25:47 +0000, "Bart Schaefer" <schaefer@candle.brasslantern.com> wrote: > Use the symbolic tags for each of the -dev- releases between 3.1.6 and > 3.1.7. In particular (based on scanning ChangeLog for modifications to > jobs.c): Ok: zsh-3_1_6-pws-2 works; zsh-3_1_6-pws-3 fails. Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-10 21:26 ` Timothy Miller @ 2001-07-10 23:27 ` Bart Schaefer 2001-07-11 8:33 ` Sven Wischnowsky 2001-07-11 18:59 ` Timothy Miller 0 siblings, 2 replies; 25+ messages in thread From: Bart Schaefer @ 2001-07-10 23:27 UTC (permalink / raw) To: Timothy Miller; +Cc: zsh-workers On Jul 10, 5:26pm, Timothy Miller wrote: > > Ok: zsh-3_1_6-pws-2 works; zsh-3_1_6-pws-3 fails. One of these must be the culprit, then: * Sven: 7605: Src/exec.c, Src/jobs.c: use killpg instead of altering process group when leader exits, fix fg test to use killpg. * Sven: 7573: Src/signals.c, Src/exec.c, Src/utils.c: fix return value of killjb(); pipelines which lose their leader get a new one. Can you send us some output of `ps' that shows the process groups of the processes involved, from both -pws-2 and anything after that? ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-10 23:27 ` Bart Schaefer @ 2001-07-11 8:33 ` Sven Wischnowsky 2001-07-11 9:51 ` Sven Wischnowsky 2001-07-11 18:59 ` Timothy Miller 1 sibling, 1 reply; 25+ messages in thread From: Sven Wischnowsky @ 2001-07-11 8:33 UTC (permalink / raw) To: zsh-workers Bart Schaefer wrote: > On Jul 10, 5:26pm, Timothy Miller wrote: > > > > Ok: zsh-3_1_6-pws-2 works; zsh-3_1_6-pws-3 fails. > > One of these must be the culprit, then: > > * Sven: 7605: Src/exec.c, Src/jobs.c: use killpg instead of > altering process group when leader exits, fix fg test to use > killpg. > > * Sven: 7573: Src/signals.c, Src/exec.c, Src/utils.c: fix return > value of killjb(); pipelines which lose their leader get a new > one. > > Can you send us some output of `ps' that shows the process groups of the > processes involved, from both -pws-2 and anything after that? You may also try the patch below (each hunk separately or both together). If this turns out to be the problem, then Irix seems to behave differently from other Unices w.r.t. calling kill() on a process group with `signal' 0. Urgh. Bye Sven --- Src/exec.c.old Wed Jul 11 10:27:51 2001 +++ Src/exec.c Wed Jul 11 10:28:19 2001 @@ -2512,7 +2512,7 @@ } else if (thisjob != -1 && cl) { if (jobtab[list_pipe_job].gleader && (list_pipe || list_pipe_child)) { if (setpgrp(0L, jobtab[list_pipe_job].gleader) == -1 || - killpg(jobtab[list_pipe_job].gleader, 0) == -1) { + kill(jobtab[list_pipe_job].gleader, 0) == -1) { jobtab[list_pipe_job].gleader = jobtab[thisjob].gleader = (list_pipe_child ? mypgrp : getpid()); setpgrp(0L, jobtab[list_pipe_job].gleader); --- Src/utils.c.old Wed Jul 11 10:33:09 2001 +++ Src/utils.c Wed Jul 11 10:33:16 2001 @@ -2404,7 +2404,7 @@ # endif #endif { - if (pgrp != mypgrp && kill(-pgrp, 0) == -1) + if (pgrp != mypgrp && kill(pgrp, 0) == -1) attachtty(mypgrp); else { if (errno != ENOTTY) -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-11 8:33 ` Sven Wischnowsky @ 2001-07-11 9:51 ` Sven Wischnowsky 0 siblings, 0 replies; 25+ messages in thread From: Sven Wischnowsky @ 2001-07-11 9:51 UTC (permalink / raw) To: zsh-workers I wrote: > ... > > You may also try the patch below (each hunk separately or both together). I forgot to say that they only undo parts of the patches Bart mentioned. Thanks for looking that up, Bart! Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-10 23:27 ` Bart Schaefer 2001-07-11 8:33 ` Sven Wischnowsky @ 2001-07-11 18:59 ` Timothy Miller 2001-07-12 3:39 ` Bart Schaefer 1 sibling, 1 reply; 25+ messages in thread From: Timothy Miller @ 2001-07-11 18:59 UTC (permalink / raw) Cc: zsh-workers On Tue, 10 Jul 2001 16:27:00 -0700, "Bart Schaefer" <schaefer@candle.brasslantern.com> wrote: > On Jul 10, 5:26pm, Timothy Miller wrote: > > > > Ok: zsh-3_1_6-pws-2 works; zsh-3_1_6-pws-3 fails. > > One of these must be the culprit, then: > > * Sven: 7605: Src/exec.c, Src/jobs.c: use killpg instead of > altering process group when leader exits, fix fg test to use > killpg. > > * Sven: 7573: Src/signals.c, Src/exec.c, Src/utils.c: fix return > value of killjb(); pipelines which lose their leader get a new > one. > > Can you send us some output of `ps' that shows the process groups of the > processes involved, from both -pws-2 and anything after that? Output is that of "ps -fljt ttyq4" with irrelevant (preexisting) processes on that tty removed; zsh started as "./Src/zsh +Z -f". -pws-2: Initial prompt: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 S tsm 9487 1092 9487 1092 0 28 20 * 564:164 8039df60 14:46:22 ttyq4 0:00 ./Src/zsh +Z -f while "ls -lR /|cat" is running: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 R tsm 9489 9487 9489 1092 15 67 20 * 394:94 - 14:47:03 ttyq4 0:00 ls -lR / b0 S tsm 9487 1092 9487 1092 0 39 20 * 582:193 8039d510 14:46:22 ttyq4 0:00 ./Src/zsh +Z -f b0 S tsm 9490 9487 9489 1092 0 60 20 * 45:25 c04cd91c 14:47:03 ttyq4 0:00 cat after ^Z: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 T tsm 9489 9487 9489 1092 0 60 20 * 394:94 - 14:47:03 ttyq4 0:01 ls -lR / b0 S tsm 9487 1092 9487 1092 0 28 20 * 582:196 8039df60 14:46:22 ttyq4 0:00 ./Src/zsh +Z -f b0 S tsm 9490 9487 9489 1092 0 60 20 * 45:25 c04cd91c 14:47:03 ttyq4 0:00 cat after fg: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 S tsm 9489 9487 9489 1092 7 63 20 * 394:94 c27ae1d8 14:47:03 ttyq4 0:01 ls -lR / b0 S tsm 9487 1092 9487 1092 0 39 20 * 582:211 8039d510 14:46:22 ttyq4 0:00 ./Src/zsh +Z -f b0 S tsm 9490 9487 9489 1092 0 60 20 * 45:25 c04cd91c 14:47:03 ttyq4 0:00 cat ******** -pws-3: initial prompt: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 S tsm 13718 1092 13718 1092 0 28 20 * 563:163 8039df60 14:55:38 ttyq4 0:00 ./Src/zsh +Z -f while "ls -lR /|cat" is running: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 R tsm 13720 13718 13720 1092 29 74 20 * 394:94 - 14:56:08 ttyq4 0:00 ls -lR / b0 S tsm 13721 13718 13721 1092 0 60 20 * 45:25 c0c5131c 14:56:08 ttyq4 0:00 cat b0 S tsm 13718 1092 13718 1092 0 39 20 * 581:191 8039d510 14:55:38 ttyq4 0:00 ./Src/zsh +Z -f after ^Z: F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 S tsm 13720 13718 13720 1092 0 60 20 * 394:94 c0c51320 14:56:08 ttyq4 0:01 ls -lR / b0 T tsm 13721 13718 13721 1092 0 60 20 * 45:25 - 14:56:08 ttyq4 0:00 cat b0 S tsm 13718 1092 13718 1092 0 39 20 * 581:192 8039d510 14:55:38 ttyq4 0:00 ./Src/zsh +Z -f This version of zsh has different behavior than the current one, it turns out now I see it interactively: it just hangs uninterruptibly (except by SIGKILL) after the ^Z, with no prompt and no additional printout of any kind. My expect script was supposed to have caught that and flagged it as a problem; I'm not sure what happened there. Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-11 18:59 ` Timothy Miller @ 2001-07-12 3:39 ` Bart Schaefer 2001-07-30 20:18 ` Timothy Miller 0 siblings, 1 reply; 25+ messages in thread From: Bart Schaefer @ 2001-07-12 3:39 UTC (permalink / raw) To: Timothy Miller, zsh-workers On Jul 11, 2:59pm, Timothy Miller wrote: } Subject: Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" } } -pws-2: } after ^Z: } F S UID PID PPID PGID SID CMD } b0 T tsm 9489 9487 9489 1092 ls -lR / } b0 S tsm 9487 1092 9487 1092 ./Src/zsh +Z -f } b0 S tsm 9490 9487 9489 1092 cat } } -pws-3: } after ^Z: } F S UID PID PPID PGID SID CMD } b0 S tsm 13720 13718 13720 1092 ls -lR / } b0 T tsm 13721 13718 13721 1092 cat } b0 S tsm 13718 1092 13718 1092 ./Src/zsh +Z -f } } This version of zsh has different behavior than the current one Yes, there was at least one other bug fix after -pws-3: * Sven: 9345: Src/exec.c, Src/jobs.c, Src/zsh.h: bug with job control when group leader exits; other problems with subshells. So it would be more helpful to see the `ps' output for 4.0.2 (say) than for 3.1.6-pws-3. 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? -- 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-12 3:39 ` Bart Schaefer @ 2001-07-30 20:18 ` Timothy Miller 2001-07-30 21:24 ` Bart Schaefer 0 siblings, 1 reply; 25+ messages in thread From: Timothy Miller @ 2001-07-30 20:18 UTC (permalink / raw) To: Bart Schaefer; +Cc: zsh-workers On Thu, 12 Jul 2001 03:39:07 +0000, "Bart Schaefer" <schaefer@candle.brasslantern.com> wrote: > Yes, there was at least one other bug fix after -pws-3: > > * Sven: 9345: Src/exec.c, Src/jobs.c, Src/zsh.h: > bug with job control when group leader exits; other problems > with subshells. > > So it would be more helpful to see the `ps' output for 4.0.2 (say) than > for 3.1.6-pws-3. 4.0.2 zsh +Z -f, ps -fljt ttyq4 with irrelevant procs removed: initial prompt F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 S tsm 8561 915 8561 915 5 28 20 * 593:218 8039e0b0 16:02:16 ttyq4 0:00 ./Src/zsh +Z -f ls -lR /|cat running b0 S tsm 8564 8561 8564 915 3 61 20 * 45:25 c0d1261c 16:02:54 ttyq4 0:00 cat b0 S tsm 8561 915 8561 915 0 39 20 * 609:232 8039d510 16:02:16 ttyq4 0:00 ./Src/zsh +Z -f b8 S tsm 8563 8561 8563 915 24 20 20 * 394:114 803fe164 16:02:54 ttyq4 0:00 ls -lR / after ^Z b0 T tsm 8564 8561 8564 915 0 60 20 * 45:25 - 16:02:54 ttyq4 0:00 cat b0 S tsm 8561 915 8561 915 0 39 20 * 609:233 8039d510 16:02:16 ttyq4 0:00 ./Src/zsh +Z -f b0 S tsm 8563 8561 8563 915 0 60 20 * 394:114 c0d12620 16:02:54 ttyq4 0:01 ls -lR / At this point it's hung. Actually, on examining the mail I sent when I first tried the |cat (Jun 12) it had the same hang-on-first-suspend, which I had forgotten, so it's not different behavior after all. > 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): separately or together, they didn't affect the problem. ps outputs (which I didn't include originally) follow. I am assuming, by the way, that the only thing I need to do after applying the patch is type "make". first patch only: initial prompt b0 S tsm 8684 915 8684 915 0 28 20 * 593:218 8039e0b0 16:09:37 ttyq4 0:00 ./Src/zsh +Z -f ls -lR /|cat running b8 R tsm 8686 8684 8686 915 29 20 20 * 394:114 - 16:09:51 ttyq4 0:00 ls -lR / b0 S tsm 8687 8684 8687 915 1 60 20 * 45:25 c0d1261c 16:09:51 ttyq4 0:00 cat b0 S tsm 8684 915 8684 915 0 39 20 * 609:232 8039d510 16:09:37 ttyq4 0:00 ./Src/zsh +Z -f after ^Z b0 S tsm 8686 8684 8686 915 0 60 20 * 394:114 c0d12620 16:09:51 ttyq4 0:01 ls -lR / b0 T tsm 8687 8684 8687 915 0 60 20 * 45:25 - 16:09:51 ttyq4 0:00 cat b0 S tsm 8684 915 8684 915 0 39 20 * 609:233 8039d510 16:09:37 ttyq4 0:00 ./Src/zsh +Z -f It's now hung. ----- both first and second patches: initial prompt b0 S tsm 8752 915 8752 915 0 28 20 * 593:219 8039e0b0 16:12:10 ttyq4 0:00 ./Src/zsh +Z -f running b0 S tsm 8752 915 8752 915 0 39 20 * 609:233 8039d510 16:12:10 ttyq4 0:00 ./Src/zsh +Z -f b0 R tsm 8754 8752 8754 915 30 75 20 * 394:114 - 16:12:31 ttyq4 0:01 ls -lR / b0 S tsm 8755 8752 8755 915 2 61 20 * 45:25 c0d1261c 16:12:31 ttyq4 0:00 cat ^Z b0 S tsm 8752 915 8752 915 0 39 20 * 609:234 8039d510 16:12:10 ttyq4 0:00 ./Src/zsh +Z -f b0 S tsm 8754 8752 8754 915 0 60 20 * 394:114 c0d12620 16:12:31 ttyq4 0:01 ls -lR / b0 T tsm 8755 8752 8755 915 0 60 20 * 45:25 - 16:12:31 ttyq4 0:00 cat hung ----- second patch only: initial prompt b0 S tsm 8819 915 8819 915 0 28 20 * 593:219 8039e0b0 16:14:23 ttyq4 0:00 ./Src/zsh +Z -f running b0 S tsm 8822 8819 8822 915 1 60 20 * 45:25 c0d1261c 16:14:35 ttyq4 0:00 cat b0 S tsm 8819 915 8819 915 0 39 20 * 609:233 8039d510 16:14:23 ttyq4 0:00 ./Src/zsh +Z -f b0 R tsm 8821 8819 8821 915 39 79 20 * 394:114 - 16:14:35 ttyq4 0:00 ls -lR / ^Z b0 T tsm 8822 8819 8822 915 0 60 20 * 45:25 - 16:14:35 ttyq4 0:00 cat b0 S tsm 8819 915 8819 915 0 39 20 * 609:234 8039d510 16:14:23 ttyq4 0:00 ./Src/zsh +Z -f b0 S tsm 8821 8819 8821 915 0 60 20 * 394:114 c0d12620 16:14:35 ttyq4 0:01 ls -lR / hung Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-30 20:18 ` Timothy Miller @ 2001-07-30 21:24 ` Bart Schaefer 2001-07-30 22:08 ` Timothy Miller 0 siblings, 1 reply; 25+ messages in thread From: Bart Schaefer @ 2001-07-30 21:24 UTC (permalink / raw) To: Timothy Miller; +Cc: zsh-workers On Jul 30, 4:18pm, Timothy Miller wrote: > > 4.0.2 zsh +Z -f, ps -fljt ttyq4 with irrelevant procs removed: > > ls -lR /|cat running > b0 S tsm 8564 8561 8564 915 3 61 20 * 45:25 c0d1261c 16:02:54 ttyq4 0:00 cat > b0 S tsm 8561 915 8561 915 0 39 20 * 609:232 8039d510 16:02:16 ttyq4 0:00 ./Src/zsh +Z -f > b8 S tsm 8563 8561 8563 915 24 20 20 * 394:114 803fe164 16:02:54 ttyq4 0:00 ls -lR / OK, notice that each of ls and cat is in its own process group. That's not supposed to happen. > > 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. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-30 21:24 ` Bart Schaefer @ 2001-07-30 22:08 ` Timothy Miller 2001-07-31 8:20 ` Sven Wischnowsky 0 siblings, 1 reply; 25+ messages in thread From: Timothy Miller @ 2001-07-30 22:08 UTC (permalink / raw) To: Bart Schaefer; +Cc: zsh-workers On Mon, 30 Jul 2001 14:24:25 -0700, Bart Schaefer <schaefer@brasslantern.com> 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-30 22:08 ` Timothy Miller @ 2001-07-31 8:20 ` Sven Wischnowsky 2001-07-31 8:30 ` Borsenkow Andrej ` (2 more replies) 0 siblings, 3 replies; 25+ messages in thread From: Sven Wischnowsky @ 2001-07-31 8:20 UTC (permalink / raw) To: zsh-workers; +Cc: Timothy Miller 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* RE: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-31 8:20 ` Sven Wischnowsky @ 2001-07-31 8:30 ` Borsenkow Andrej 2001-07-31 14:35 ` Timothy Miller 2001-07-31 20:50 ` Timothy Miller 2 siblings, 0 replies; 25+ messages in thread From: Borsenkow Andrej @ 2001-07-31 8:30 UTC (permalink / raw) To: Sven Wischnowsky, zsh-workers; +Cc: Timothy Miller > > Aha. Hm, well, is there any Unix where killpg(p, s) does something > different than kill(-p, s)? It should be the same by definition: If pgrp is greater than 1, killpg(pgrp, sig) is equivalent to kill(-pgrp, sig). If pgrp is less than or equal to 1, the behavior of killpg() is undefined. -andrej ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-31 8:20 ` Sven Wischnowsky 2001-07-31 8:30 ` Borsenkow Andrej @ 2001-07-31 14:35 ` Timothy Miller 2001-07-31 20:50 ` Timothy Miller 2 siblings, 0 replies; 25+ messages in thread From: Timothy Miller @ 2001-07-31 14:35 UTC (permalink / raw) To: Sven Wischnowsky; +Cc: zsh-workers On Tue, 31 Jul 2001 10:20:57 +0200 (MET DST), Sven Wischnowsky <wischnow@informatik.hu-berlin.de> wrote: > > 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.) Unfortunately, no such luck. However, it turns out that zsh 3.1.6 results in the same behavior, and in fact if I manually send a TSTP to the right process group, cat is still not suspended. For a larger set of processes, from "man makemovie", all but one process is stopped (in 3.1.6): running F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 S tsm 915 914 915 915 0 39 20 * 774:436 8039d510 12:04:34 ttyq4 0:06 -zsh-beta b0 S tsm 21359 915 21359 915 0 60 20 * 431:105 804219ac 10:22:24 ttyq4 0:00 man makemovie b0 S tsm 21361 21360 21359 915 0 60 20 * 71:29 804221dc 10:22:24 ttyq4 0:00 sh -c pcat /usr/share/catman/u_man/ b0 S tsm 21362 21361 21359 915 0 28 20 * 478:183 8039e0b0 10:22:24 ttyq4 0:00 less b0 S tsm 21364 21362 21359 915 0 60 20 * 368:130 c0674a40 10:22:24 ttyq4 0:00 col b0 S tsm 21360 21359 21359 915 0 60 20 * 427:101 80424acc 10:22:24 ttyq4 0:00 man makemovie ^Z F S UID PID PPID PGID SID C PRI NI P SZ:RSS WCHAN STIME TTY TIME CMD b0 S tsm 915 914 915 915 0 28 20 * 774:436 8039e0b0 12:04:34 ttyq4 0:06 -zsh-beta b0 T tsm 21359 915 21359 915 0 60 20 * 431:105 - 10:22:24 ttyq4 0:00 man makemovie b0 T tsm 21361 21360 21359 915 0 60 20 * 71:29 - 10:22:24 ttyq4 0:00 sh -c pcat /usr/share/catman/u_man/ b0 T tsm 21362 21361 21359 915 0 60 20 * 478:185 - 10:22:24 ttyq4 0:00 less b0 S tsm 21364 21362 21359 915 0 60 20 * 368:130 c0674a40 10:22:24 ttyq4 0:00 col b0 T tsm 21360 21359 21359 915 0 60 20 * 427:101 - 10:22:24 ttyq4 0:00 man makemovie But with "man killpg", all four processes (not including a col in this case) are stopped. I've been using this version of zsh for years now with no problems, so if this is an IRIX bug, it doesn't seem to affect anything I've noticed. (Well, there is one minor problem I've had, but it happens on other OSs too (I think--now I'm going to have to check): occasionally and nondeterministically zsh will fail to return immediately to a prompt after a suspended less, but hitting return does bring back the prompt.) Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-31 8:20 ` Sven Wischnowsky 2001-07-31 8:30 ` Borsenkow Andrej 2001-07-31 14:35 ` Timothy Miller @ 2001-07-31 20:50 ` Timothy Miller 2001-08-01 8:35 ` Sven Wischnowsky 2 siblings, 1 reply; 25+ messages in thread From: Timothy Miller @ 2001-07-31 20:50 UTC (permalink / raw) To: Sven Wischnowsky; +Cc: zsh-workers On Tue, 31 Jul 2001 10:20:57 +0200 (MET DST), Sven Wischnowsky <wischnow@informatik.hu-berlin.de> wrote: > > 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. I just manually changed config.h to not define HAVE_KILLPG, cleaned and recompiled everything, and it all seems to work, except for make check C02 and Y* which were expected not to work anyway. Oops, actually, that was only on the irix 6.3 machine...on irix 6.5 it turns out if I compile zsh with the system cc, with or without HAVE_KILLPG, it fails make check in a big way (segfaults at the drop of a hat on every test, happens with 4.0.1 too) which I will report in a separate email, as it's a separate bug. If I allow it to compile with gcc, it completes the checks that it's supposed to complete, and if I manually turn HAVE_KILLPG off, it even handles suspension correctly. I'm going to regard this bug as essentially fixed (modulo incorporating something reflecting this change into the source) as a result, but will post the other bug shortly. Tim ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-07-31 20:50 ` Timothy Miller @ 2001-08-01 8:35 ` Sven Wischnowsky 2002-02-25 9:31 ` Sven Wischnowsky 0 siblings, 1 reply; 25+ messages in thread From: Sven Wischnowsky @ 2001-08-01 8:35 UTC (permalink / raw) To: zsh-workers Timothy Miller wrote: > ... > > I just manually changed config.h to not define HAVE_KILLPG, cleaned and > recompiled everything, and it all seems to work, except for make check C02 > and Y* which were expected not to work anyway. So, which solution do you all prefer? 1) adding a killpg() macro in some header file, 2) changing all killpg()s to kill(-...) or 3) changing configure to not use killpg() on Irix? I'd prefer 1) or 3) -- with 2) someone could sometime use killpg() because he doesn't know about this. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs 2001-08-01 8:35 ` Sven Wischnowsky @ 2002-02-25 9:31 ` Sven Wischnowsky 0 siblings, 0 replies; 25+ messages in thread From: Sven Wischnowsky @ 2002-02-25 9:31 UTC (permalink / raw) To: zsh-workers Since that old while-loop patch came up again, I want to remember everyone that I think we haven't done anything about that Irix-bug yet (unless I've missed something?). The last message in the thread was 15557: > Timothy Miller wrote: > > > ... > > > > I just manually changed config.h to not define HAVE_KILLPG, cleaned and > > recompiled everything, and it all seems to work, except for make check C02 > > and Y* which were expected not to work anyway. > > So, which solution do you all prefer? 1) adding a killpg() macro in some > header file, 2) changing all killpg()s to kill(-...) or 3) changing configure > to not use killpg() on Irix? > > I'd prefer 1) or 3) -- with 2) someone could sometime use killpg() > because he doesn't know about this. It seems that the bug could be fixed by using kill(-...) instead of killpg(). Bye Sven -- Sven Wischnowsky wischnow@berkom.de ^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2002-02-25 9:32 UTC | newest] Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2001-06-11 15:11 fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs Timothy Miller 2001-06-12 8:15 ` Sven Wischnowsky 2001-06-12 15:00 ` Timothy Miller [not found] ` <1010612154026.ZM24394@candle.brasslantern.com> 2001-06-12 16:13 ` Timothy Miller 2001-06-13 3:55 ` Bart Schaefer 2001-07-06 22:40 ` Timothy Miller 2001-06-14 7:32 ` Sven Wischnowsky 2001-07-06 22:52 ` Timothy Miller 2001-07-10 15:22 ` Timothy Miller 2001-07-10 16:25 ` Bart Schaefer 2001-07-10 21:26 ` Timothy Miller 2001-07-10 23:27 ` Bart Schaefer 2001-07-11 8:33 ` Sven Wischnowsky 2001-07-11 9:51 ` Sven Wischnowsky 2001-07-11 18:59 ` Timothy Miller 2001-07-12 3:39 ` Bart Schaefer 2001-07-30 20:18 ` Timothy Miller 2001-07-30 21:24 ` Bart Schaefer 2001-07-30 22:08 ` Timothy Miller 2001-07-31 8:20 ` Sven Wischnowsky 2001-07-31 8:30 ` Borsenkow Andrej 2001-07-31 14:35 ` Timothy Miller 2001-07-31 20:50 ` Timothy Miller 2001-08-01 8:35 ` Sven Wischnowsky 2002-02-25 9:31 ` Sven Wischnowsky
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).