[Ddclient-forum] [ ddclient-Patches-1893144 ] Foreground patch
Brought to you by:
supersandro2000,
wimpunk
From: SourceForge.net <no...@so...> - 2009-08-17 20:30:59
|
Patches item #1893144, was opened at 2008-02-13 23:18 Message generated for change (Comment added) made by shmlchr You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=676130&aid=1893144&group_id=116817 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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: John Palkovic (drjohnny) Assigned to: wimpunk (wimpunk) Summary: Foreground patch Initial Comment: I am running ddclient as a dyndns.org client on a debian etch system. I had some problems with the startup script in the debian package. It was also out of date with no ssl support. I decided to patch ddclient to run under the control of runit (http://smarden.org/runit), a unix service supervisor akin to svscan (http://cr.yp.to/daemontools/svscan.html). I created the patch and have been running with it for a week with no issues to report. The patch adds a -foreground argument. When called with this argument, ddclient runs as a daemon but does not fork(). This is appropriate for use with runit or svscan (or launchd on a darwin system). There are changes to the daemon logic, so I would appreciate any comments. I will attach the patch with the upload button. -John Palkovic 13 Feb 2008 ---------------------------------------------------------------------- Comment By: Sam Homer (shmlchr) Date: 2009-08-17 22:30 Message: Thanks a lot drjohnny. I'm using your patch on Mac OS X 10.5.8 with launchd. I have attached the same patch applied against 3.8.0. All credit goes to drjohnny, mistakes are mine. ---------------------------------------------------------------------- Comment By: wimpunk (wimpunk) Date: 2008-02-18 09:28 Message: Logged In: YES user_id=722282 Originator: NO You're correct, I've made a mistake. Your patch could also be useful for debugging so I think I'll take closer look and maybe it will get included in the next release of ddclient. ---------------------------------------------------------------------- Comment By: John Palkovic (drjohnny) Date: 2008-02-14 01:02 Message: Logged In: YES user_id=985118 Originator: YES You are mistaken. fork() cannot be called, nor can exit() be reached to run properly under the control of runit or svscan. I want behavior like (apache2) httpd -DFOREGROUND or cron -f. ddclient -daemon=0 is not a daemon, it exits quickly on my debian etch box: # date Wed Feb 13 17:45:42 CST 2008 # time ddclient -daemon=0 -file /etc/ddclient.conf real 0m0.392s user 0m0.280s sys 0m0.036s This behavior is obvious if one glances at the while() statement on line 655 of 3.7.3. I want the program to loop in the do/while beginning on line 598 of version 3.7.3 without ever having called fork(). It should not exit() unless forced to by a signal or a restart. It must not call fork(). Do you understand? I don't think this functionality is available in the stock 3.7.3. ---------------------------------------------------------------------- Comment By: wimpunk (wimpunk) Date: 2008-02-14 00:00 Message: Logged In: YES user_id=722282 Originator: NO As far as I can see, you don't need a patch, you just need the daemon=0 option. I'm also wondering why you had some startup problems with the debian package. I didn't got any report about that from other people. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=676130&aid=1893144&group_id=116817 |