[OpenSIPS-Users] About daemonizing of opensips
Brett Nemeroff
brett at nemeroff.com
Thu Apr 23 18:39:25 CEST 2009
I'm not entirely sure what you are doing. OpenSIPS already forks properly.
Try using fork=yes/no instead. I'm not sure what dont_fork is.. but it's
awfully confusing (dont_fork=no? what?)
-Brett
On Wed, Apr 22, 2009 at 6:44 AM, SAMEER KUMAR <sameer.kasi200x at gmail.com>wrote:
> Dear Sir,
>
> While running opensips I am facing a problem, I am using -D option but
> still dont_fork variable is not set to 1. The switch case block that reads
> the command line arguments sets the dont_fork in main.c to 1 but afterwards
> before the if condition (where daemonize() call is made) it is changed to 0.
> I have tried lot of debugging statements, I have got the result which I have
> attached below:
>
> Please can some one explain me why my opensips is always going to
> dont_fork=0 mode, even if i specify -D as command line arg at the time of
> starting opensips.
>
> I am trying to add a multithreading capability in main_loop(). for testing
> purpose I will pass an arguement 0 or 1 as argv[1], and it will be checked.
> If argv[1]==1 it will go into the multithreading part. I guess if I am
> creating one thread per port (on which opensips is supposed to listen), I
> need not load modules in saperate process, I think I can keep rest of the
> funcitonality similar as dont_fork mode and jus add the code to create a
> thread per process as per the link list in si startng at udp_listen or
> tcp_listen etc.
>
>
> Kind guidance is invited.
> *
> [root at fbsd52 opensips-1.4.4-tls]# opensips 0 -l udp:10.1.10.86:5060 -D
>
> We will not be forking new daemons
>
> After switch the dont_fork is 1
>
> You have selected multithreaded mode
>
> After loading config file the dont_fork is 1
>
> After loading config stream the dont_fork is 1
>
> After yyparse and cfg_error checks dont_fork is 0
>
> After config_check and check_rls checks dont_fork is 0
>
> After print_rl() call dont_fork is 0
>
> After print_rl() call dont_fork is 0
>
> Before initializing the child_no values dont_fork is 0
>
> After initializing the dont_fork is 0
>
> After initializing chil_no n tcp_child_no the dont_fork is 0
> Listening on
> udp: 10.1.10.86 [10.1.10.86]:5060
> Aliases:
> udp: fbsd52.example.net:5060
>
>
> Value of dont_fork jus before the if check: 0
>
> Unfortunately new daemons are being forked... and you can not help it
> [root at fbsd52 opensips-1.4.4-tls]#
> *
>
> Regards,
> Sameer Kumar
> B.Tech, Computer Engineering
> Institute of Technology,
> Nirma University,
> Ahmedabad, Gujarat
> email: sameer.kasi200x at gmail.com
> 05bce032 at nirmauni.ac.in
> Phone: +919375220396
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090423/3ad197a2/attachment.htm
More information about the Users
mailing list