[sr-dev] Patches to get proper status code in daemonize mode

Henning Westerholt henning.westerholt at 1und1.de
Mon Apr 19 18:41:31 CEST 2010


On Monday 19 April 2010, Iñaki Baz Castillo wrote:
> > With a select it is possible to do a blocking read from some time. I
> > strongly suggest more than 4-5 seconds, I think 30s should be a minimum.
> 
> ok, but IMHO 30 seconds is too much for a init script. However this is
> a corner case.

Hi Iñaki,

i think its a bit of a problem that the init script can block somehow, as this 
causes delays for the system start. But on the other hand, kamailio is not 
really desktop software.. 

But if we could allow the init script to block for some time, what about this 
(IMHO much simpler) approach:

* kamailio gets started as usual
* init script sleeps for some time (e.g. 5-10 seconds, configurable)
* init script checks if the process is really running (process list, FIFO, 
  SIP OPTIONS..)
* init script returns the appropriate return code

Not sure if you already considered this.

Cheers,

Henning



More information about the sr-dev mailing list