On Wednesday 28 June 2006 09:26, Simon Morvan wrote:
Hello there,
Simple question : What is the "rank" passed to the per-child module
initialization function ? And why is it sometimes negative ?
The rank tells you if the child process is a clone of a "worker" or one of
the "special processes. From the sr_modules.h file:
/* Macros - used as rank in child_init function */
#define PROC_MAIN 0 /* Main ser process */
#define PROC_TIMER -1 /* Timer attendant process */
#define PROC_FIFO -2 /* FIFO attendant process */
#define PROC_TCP_MAIN -4 /* TCP main process */
#define PROC_UNIXSOCK -5 /* Unix domain socket server processes */
Then rank will go from 1-n depending on the number of listener processes you
have.
Hope this helps,
ronw.
--
Ron Winacott - SOMA Networks, Inc.
The scientists of today think deeply instead of clearly. One must be sane to
think clearly, but one can think deeply and be quite insane.
- Nikola Tesla