Signal handling tune up.
Pierre A. Humblet
Fri Aug 29 14:19:00 GMT 2003
Christopher Faylor wrote:
> I was heartened to see that zsh did not crash when I sicc'ed this
> program on it -- until I tried to type something at the zsh prompt and
> saw that it was hung. The reason was that the recursive signal call
> stuff was still not right. We were restoring the return address
> incorrectly. AFAICT, we really do have to use the stored
> retaddr_on_stack to rectify setup_handler's inappropriate "fixup" of the
> return address. Restoring it to 36(%%esp) wasn't right.
Wow. What was wrong? After you noticed that one could remove
before the call to set_process_mask, I though eveything made perfect sense.
After returning from the (user) signal handler and pulling off the
argument, both the esp and ebp should be exactly as before the call.
It that's not true, the whole stack model of programming breaks down.
> The excess
> nosync loop would have only introduced a processor load but input should
> have still been functional since the signal handler calls were probably
> handled by the inner loop in wait_sig.
> So, I ended up checking in the change to use events and am building
> a snapshot now. With luck, I've solved Corinna's problems and maybe
> I can even release 1.5.3 this weekend.
I surely hope so!
More information about the Cygwin-patches