[Devel] [ openser-Patches-1720847 ] -D option: "do not daemonize", -F option: "do not fork"

SourceForge.net noreply at sourceforge.net
Thu May 17 18:40:03 CEST 2007


Patches item #1720847, was opened at 2007-05-17 12:40
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1720847&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver 1.2.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Anatoly Pidruchny (apidruchny)
Assigned to: Nobody/Anonymous (nobody)
Summary: -D option: "do not daemonize", -F option: "do not fork"

Initial Comment:
This is an improved patch 1689998. The issue with the original patch was that sometimes the grand-children of the main openser process stayed alive when the main openser process and its children terminated. The improvement is that now the main openser process creates a new process group even when "do not daemonize" option is used. This will allow the main openser process to send signals to the whole process group and that means that grandchildren will also receive signals from the main process and will also terminate with the main openser process and its children. The original description of the patch follows.

This patch is to allow 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. Another option, option -F, is added as the replacement of the old -D option. The -F option sets both no_daemon and dont_fork variables, so that it means exactly the same as -D option meant before.

Anatoly Pidruchny
NewCross Technologies
email: apidruchny at newxt.com


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1720847&group_id=139143



More information about the Devel mailing list