On Sat, Aug 13, 2011 at 11:52:08AM -0700, Bart Schaefer wrote:
> if (findproc(pid, &jn, &pn, 0)) {
> + if (((jn->stat & STAT_BUILTIN) ||
> + (list_pipe && (jobtab[thisjob].stat & STAT_BUILTIN))) &&
> + WIFSTOPPED(status) && WSTOPSIG(status) == SIGTSTP) {
> + killjb(jn, SIGCONT);
> + zwarn("job can't be suspended");
> + } else {
Sometimes, zsh segfaults here while doing B03print.ztst in POSIX
locale with thisjob equals to -1. Not 100% reproducable, though.
$ LC_ALL=C zsh +Z -f ./ztst.zsh ./B03print.ztst
./B03print.ztst: starting.
[1] 20076 segmentation fault (core dumped) LC_ALL=C zsh +Z -f ./ztst.zsh ./B03print.ztst
...
Core was generated by `zsh +Z -f ./ztst.zsh ./B03print.ztst'.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000004745b1 in wait_for_processes () at signals.c:494
494 (list_pipe && (jobtab[thisjob].stat & STAT_BUILTIN))) &&
(gdb) list
489 * Find the process and job containing this pid and
490 * update it.
491 */
492 if (findproc(pid, &jn, &pn, 0)) {
493 if (((jn->stat & STAT_BUILTIN) ||
494 (list_pipe && (jobtab[thisjob].stat & STAT_BUILTIN))) &&
495 WIFSTOPPED(status) && WSTOPSIG(status) == SIGTSTP) {
496 killjb(jn, SIGCONT);
497 zwarn("job can't be suspended");
498 } else {
(gdb) p thisjob
$1 = -1
--
Regards, --
Sir Raorn. --- http://thousandsofhate.blogspot.com/
Attachment:
signature.asc
Description: Digital signature