Subject: [32751] net/dhcp startupitem

Blair Zajac blair at orcaware.com
Wed Jan 16 08:23:46 PST 2008


markd at macports.org wrote:
>> i Mark,
>>
>> So it looks like the bit magic that got this to work is the -f
>> command, which basically tells dhcpd not to daemonize, which would be
>> a good thing in our case, as the process of daemonizing would look to
>> daemondo or launchd as if dhcpd were exiting, which would cause the
>> constantly restarting behavior Blair described.
>>
> Hi James,
> 
> So I've looked up what "daemonize" means and I see it entails making a
> child of the initializing process.  So I understand why daemondo thinks a
> daemonized process has exited.  But might some processes not have a switch
> to keep in the foreground as in the case of dhcp?  And if not, would that
> be the rare case where startupitem.pidfile would be used with
> startupitem.executable?  If I recall correctly, they could be used
> together but I hadn't thought of a reason where it would be useful to do
> so.  At the very least I should document that processes that daemonize are
> a problem for startupitem.executable.

I think most programs that daemonize themselves have a command line option to 
stay in the foreground.  It makes it easier for the program to be debugged.

Regards,
Blair

-- 
Blair Zajac, Ph.D.
CTO, OrcaWare Technologies
<blair at orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/


More information about the macports-dev mailing list