Hi,
It seems that in your config file you are specifying 'fork=yes' , so the dont_fork variable is being overwritten when the cfg is parsed.
I have committed a fix for this in the 1.7, 1.8 and trunk branches.
Regards,
Vlad
When I start OpenSIPS 1.7.2 in the command-line and specify the -D parameter, it detaches from the console anyway. There seems to be a bug somewhere, since I've inserted a printf() in main.c, in the call to daemonize() and it is indeed called, even though I specified -D. So it seems like dont_fork is not properly set or it is corrupted:
if (!dont_fork){
fprintf(stderr, "daemonizing!\n"); /* debug, inserted by me */
if ( daemonize((log_name==0)?argv[0]:log_name, &own_pgid) <0 )
goto error;
}
Invoking it like this:
/usr/sbin/opensips -f /usr/local/etc/opensips/opensips.cfg -P /usr/local/var/run/opensips.pid -D
I get:
Listening on
udp: 192.168.1.3 [192.168.1.3]:5060
udp: 10.0.0.2 [10.0.0.2]:5060
Aliases:
udp: myboxip:5060
udp: myserver:5060
daemonizing!
Hi,
It seems that in your config file you are specifying 'fork=yes' , so the dont_fork variable is being overwritten when the cfg is parsed.
I have committed a fix for this in the 1.7, 1.8 and trunk branches.
Regards,
Vlad
Log in to post a comment.