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

Re: zsh hangs sometimes continued.



On Apr 1,  5:48pm, Phil Pennock wrote:
} Subject: Re: zsh hangs sometimes continued.
}
} On 2011-04-01 at 07:18 -0700, Bart Schaefer wrote:
} > Reading the explanation left me wondering whether there's an additional
} > problem in the event that the shell is spawning processes fast enough
} > for the PID of a terminated-but-not-yet-reaped job to have been re-used
} > in a new still-running job?
} 
} Is this an April Fool's joke?  [suffering flu, can't tell]

No, I'm just using the word "reaped" too loosely.

My thought was that a job in pipeline or the like might still have a
slot in *zsh's* job table (if the rest of the pipeline had not exited)
even though the corresponding process was already gone (and had been
waited-for in the SIGCHLD handler).  Hence zsh could end up thinking
it needed to do a synchronous wait for the old job which, if the pid
was never re-used, would immediately fail, but if the pid was reused
would instead hang while the new one with the same pid was still
running (and then maybe fail to mark the newer one as done in its
actual job slot).

On further reflection, though, either this must already have been
impossible, or the test in PWS's patch would cover it as well.



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