Re: setjmp usage
| From: | Rasmus Lerdorf | Date: | Tue, 18 Mar 2008 18:24:41 +0000 |
| Subject: | Re: setjmp usage | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36195@lists.php.net to get a copy of this message | ||
Stanislav Malyshev wrote:
Hi!It's the same thing for longjmp. POSIX doesn't specify what should be done with the signal mask after a longjmp either, so to be consistent we should use siglongjmp() as well and explicitly define what we want to do with the signal mask. I'll work up a patch. -RasmusWe are using setjmp(__bailout) in zend_try, but setjmp behaves differently on BSD and Linux. POSIX doesn't specify whether the signal mask should be saved or not for this call, so different operating systems do different things here. I think it would be more consistent if we used sigsetjmp(__bailout,0) to always specify that we don't need to store the signal mask. This avoids an expensive sigprocmask syscall.Sounds good. Can we still use longjmp or have to use siglongjmp?