Re: [Imap-uw] Re: Imap-uw and mbox corruption (Mark Crispin)

2009-04-06 Thread Dan Lukes
On Mon, 6 Apr 2009, David Houlder wrote: I don't think longjmp() is async signal safe. You need to specify environment we are talking about. IEEE Std 1003.1 declare: As it bypasses the usual function call and return mechanisms, longjmp() shall execute correctly in contexts

Re: [Imap-uw] Re: Imap-uw and mbox corruption (Mark Crispin)

2009-04-05 Thread Mark Crispin
On Mon, 6 Apr 2009, David Houlder wrote: I don't think longjmp() is async signal safe. There is "safe" and there is "safe" There is "safe" in the sense of being able to return back to what the program was doing. But in this case, the program has no intention of returning. It's reached

[Imap-uw] Re: Imap-uw and mbox corruption (Mark Crispin)

2009-04-05 Thread David Houlder
From: Mark Crispin To work around this, I tried to use a setjmp()/longjmp() in the signal handler that would take imapd back to the main command loop and then to code to save and exit. Supposedly, longjmp() is supposed to unwind whatever context occurred since the setjmp(). I don't think