Hi, Henning,
The first small but useful change that we want is the ability to run
OpenSER in "no-daemon" mode. We need to do this to run OpenSER under
daemontools. There is a -D option already that means "Do not fork into
daemon mode". But the problem with this option is that it really means
more then just "Do not fork into daemon mode". It really means do not
fork at all, i.e. do not create any child OpenSER processes. The patch
below adds a variable no_daemon in main.c, makes -D option only change
the no_daemon variable and makes the variable no_daemon only control
whether OpenSER daemonizes itself or not. Yes, this patch means that -D
option will no longer change the value of dont_fork variable. Well, we
think a new option has to be added that will turn on the dont_fork
variable. This patch does not add such a new option.

Please let me know what should I do contribute this patch. I can also
add an additional option to control the dont_fork variable, if you
suggest so. Below is the proposed patch.
    

In my opionion the normal behavior of "-D" should not be changed. This would 
only confuse users without so much gain. So the best would be to introduce a 
new variable that control only the daemonize behaviour.
  
Well, -D option is only for OpenSER debugging purposes, right? It is of interest only for OpenSER developers. It is just can not be used by any regular users. This is why I think it is possible to change its meaning now. I think it is just more logical to make -D option mean "do not Daemonize", and a new -F option to mean "do not Fork at all". It would be confusing if the meaning of -D option were "do not Fork at all", and the meaning of -F option were "do not Daemonize". But, I think, the developer that will be assigned to review this patch, will have to make the decision to keep the meaning of the -D option or to change it.

If you have reworked your patch, you should add it to the patch tracker of the 
project, as Daniel said.
  
Yes, I did already. The patch has Request ID 1689998. I added the new -F option that means "do not Fork at all", i.e., it behaves exactly as -D option behaved.

If you post another patch per e-mail (for review) it is the best to attach the 
file to the mail. If you include them in the mail, tabs and whitespaces get 
mixed up, and the patch need to reworked before it can be applied.
  
Thanks, I will use attachment next time.

Regards,

Anatoly.

_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to