2010/12/28 Bogdan-Andrei Iancu <[email protected]>:
> 1) parent process starts
> 2) demonize is start -> daemon process started
> 3) parent process still running waiting for feedback from the daemon process
> 4) daemon process does all the core init, does init module, all with success
> 5) daemon process forks the worker processes (the children procs)
> 6) daemon process successfully did the job, so returns success
> 7) parent process receives the feedback from the daemon process, so it also
> ends with success
> 8) return code of parent process is OK
> 9) children procs do child_init -> db stuff
> 10) on child proc fails the init -> it terminates

This step 10 could occur due to wrong user:passwd in a DB connection,
am I right?

> 11) daemon proc receivs the SIG_CHILD signal and triggers the shutdown
> 12) everything is shutdown in a clean way
>
> Result: return code was success, but opensips failed to start due a startup
> error.
>
> This is why I'm saying that you need to look further than the daemon proc,
> if you want to implement a proper startup sequence and return code.

Ok, I understand. However I "think" (not sure now) that a fail in step
10 still makes the daemon (so also parent process) to properly return
with failure code, but I must check it.


Best regards.



-- 
Iñaki Baz Castillo
<[email protected]>

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to