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

Re: signal mask bug?

On Feb 15,  2:17pm, Danek Duvall wrote:
}     % jobs
}     [1]  + running    sleep 30 | 
}            unknown signal (core dumped)                 cat
} Of course, nothing actually dumped core, suggesting it's just a reporting
} problem.

Hm.  This indicates that WCOREDUMP() is returning true for whatever the
job status of the cat process is.

However, presumably the status of that job should have been set to
SP_RUNNING at the same time it was for "sleep".

Which it is -- makerunning() assigns SP_RUNNING to pn->status of "cat"
during "bg".

But then when we reach prinjob() from the "jobs" command, pn->status of
that job has changed from -1 to 65535.

This happens at signals.c:525 in wait_for_processes(), when the status
returned from wait3(&status) [line 457] is assigned to it.

I suspect the status returned from wait3 is invalid in this case, but
I'm not sure.  What would a status of 65535 mean?  Or should it be
masked in some way that it isn't?

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