[asterisk-dev] signal

Mark Michelson mmichelson at digium.com
Mon Jan 18 09:58:22 CST 2010


John Todd wrote:
> On Jan 18, 2010, at 1:29 AM, Bhrugu Mehta wrote:
> 
>> Hi, all
>> in jenitor project of asterisk there is lien change signal to
>> sigaction function, but for the competibility issue
>> signal functin is bettor then sigaction. so it is safe to keep
>> signal() in asterisk.
>>
>> regards
>> --  
>> Bhrugu Mehta
>> Sr. S/W Engineer (D&D)
>> Telephony Team (Asterisk,zaptel etc.)
> 
> 
> Hello -
>    I'm not quite clear on your message, and I think others may not  
> quite know what you mean as well.  Is this a question?  Can you please  
> re-state your posting, and someone will hopefully answer.
> 
> JT
> 

I believe that he's saying that the use of signal(2) is more portable than the 
use of sigaction(2). sigaction(2) is a newer function than signal(2), and iirc, 
it is preferred because it allows you to atomically perform multiple actions 
with regards to signals as opposed to inherently having race conditions in your 
code (see the Signals chapter of Advanced Programming in the Unix Environment 
for a good discussion on the matter). However, I would be interested in knowing 
exactly why the OP thinks that signal(2) is a more portable choice than 
sigaction(2).

Mark Michelson



More information about the asterisk-dev mailing list