THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#66 - Kamailio/SIP-Router should return error (255) when cannot assign requested address
even in fork mode
User who did this - IƱaki Baz Castillo (ibc)
----------
I attach 3 patches with modifications to main.c, daemonize.c and daemonize.h which
implement the desired feature.
Note however that these patches have been built for kamailio 1.5.4 (rev 6000).
The patches do the following:
When running in daemonize mode the parent process returns the proper status code. This is,
if a Kamailio DB connection uses a wrong password, or a listen address is not a local
address, then the parent process (which could be invoked as "/etc/init.d/kamailio
start") would return -1 error rather than 0.
To achieve it, the patches do the following:
- 'daemonize()' function doesn't exit the parent process, instead the parent
process gets blocked in 'main()' function reading a pipe.
- When the main process initializes the modules, sockets and so, it writes into the pipe
so the parent process exists with 0.
- If the main process fails to start then the pipe write fd is closed with no more
processes writting into it so the parent process detects it and exists with -1 error.
I strongly need this feature (this is the reason I've coded it first for kamailio
1.5.4) as it's required when working with HeartBeat. The reason is simple, a daemon
init script *MUST NOT* return 0 (ok) if the daemon failed to start. These patches prevent
such wrong behavior.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=66#comment79
You are receiving this message because you have requested it from the Flyspray bugtracking
system. If you did not expect this message or don't want to receive mails in future,
you can change your notification settings at the URL shown above.