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

Re: How to misplace an entire pipeline



On Sep 12,  5:51pm, Alexey I. Froloff wrote:
}
} Sometimes, zsh segfaults here while doing B03print.ztst in POSIX
} locale with thisjob equals to -1.  Not 100% reproducable, though.

This is why I wondered in the original patch message:
: At this point list_pipe is true but the job receiving the stop signal
: is not in the process list of the current job (thisjob), so it's
: necessary to check whether the current job is a builtin.  Unless you
: can think of a case where thisjob would not correctly identify the
: foreground job at the time the signal is handled?

If I understand correctly, thisjob == -1 means there is no foreground
job.  I'm scratching my head over how list_pipe can be true when there
is no job in the foreground.  Could you please run

    ZTST_verbose=2 make TESTNUM=B03 check

to verify which test is causing the segmentation fault?  I suspect it's
the very last test with "print -lO ... | while read ..." but I'd like
to be sure.  (OTOH it may not be possible to reproduce the fault with
verbose output, but it's worth a try.)

I further suspect the signal is arriving during foo=$line[i] or some
other part of the inner loop where no actual command is being run, but
list_pipe remains true because of the outer loop.



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