[sr-dev] About child_init function
Iñaki Baz Castillo
ibc at aliax.net
Sat Oct 2 18:30:49 CEST 2010
2010/10/2 Daniel-Constantin Mierla <miconda at gmail.com>:
>> So my question is: should I check the rank parameter in child_init
>> function just to run the code for real workers?
>
> yes, check it. The phrases use same term, while in one case should be 'sip
> worker process' to differentiate from other type of workers.
>
> Beware than from v3.0 you get also rank PROC_INIT, which is called for main
> process after all mod_init functions were executed.
Then, is it ok if I use:
if (rank==PROC_INIT || rank==PROC_MAIN || rank==PROC_TCP_MAIN)
return 0;
?
what about possible PROC_SCTP_MAIN (if it exists) and others?
I've checked that all those special processes (non workers) as rack <=
0. Is it safe if I just apply the code for processes with rank > 0?
Thanks a lot.
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the sr-dev
mailing list