Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 March 18, 2008 04:54:39

Rasmus L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] setjmp usage


We are using setjmp(__bailout) in zend_try, but setjmp behavesdifferently on BSD and Linux. POSIX doesn't specify whether the signalmask should be saved or not for this call, so different operatingsystems do different things here. I think it would be more consistentif we used sigsetjmp(__bailout,0) to always specify that we don't needto store the signal mask. This avoids an expensive sigprocmask syscall.-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#2 March 18, 2008 19:18:17

Stanislav M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] setjmp usage


Hi!We are using setjmp(__bailout) in zend_try, but setjmp behavesdifferently on BSD and Linux. POSIX doesn't specify whether the signalmask should be saved or not for this call, so different operatingsystems do different things here. I think it would be more consistentif we used sigsetjmp(__bailout,0) to always specify that we don't needto store the signal mask. This avoids an expensive sigprocmask syscall.Sounds good. Can we still use longjmp or have to use siglongjmp?
--
Stanislav Malyshev, Zend Software Architect
http://www.zend.com/(408)253-8829 MSN:

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#3 March 18, 2008 19:25:23

Rasmus L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] setjmp usage


Stanislav Malyshev wrote:Hi!We are using setjmp(__bailout) in zend_try, but setjmp behavesdifferently on BSD and Linux. POSIX doesn't specify whether thesignal mask should be saved or not for this call, so differentoperating systems do different things here. I think it would be moreconsistent if we used sigsetjmp(__bailout,0) to always specify that wedon't need to store the signal mask. This avoids an expensivesigprocmask syscall.Sounds good. Can we still use longjmp or have to use siglongjmp?It's the same thing for longjmp. POSIX doesn't specify what should bedone with the signal mask after a longjmp either, so to be consistent weshould use siglongjmp() as well and explicitly define what we want to dowith the signal mask.I'll work up a patch.

-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

Board footer

Moderator control

Enjoy the 11th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support