Ñò ¿Êu?c@s_ddkZddkZdddd„Zd„ZedjoedddƒeƒndS(iÿÿÿÿNs /dev/nullc CsÂtiiƒtiiƒtiiƒy.tiƒ}|djotidƒnWnBtj o6}tii d|i |i fƒtidƒnXti dƒti dƒtiƒy.tiƒ}|djotidƒnWnBtj o6}tii d|i |i fƒtidƒnXt|dƒ}t|dƒ}t|ddƒ}ti|iƒtiiƒƒti|iƒtiiƒƒti|iƒtiiƒƒdS( s¾This forks the current process into a daemon. The stdin, stdout, and stderr arguments are file names that will be opened and be used to replace the standard file descriptors in sys.stdin, sys.stdout, and sys.stderr. These arguments are optional and default to /dev/null. Note that stderr is opened unbuffered, so if it shares a file with stdout then interleaved output may not appear in the order that you expect. isfork #1 failed: (%d) %s it/sfork #2 failed: (%d) %s trsa+N(tsyststdouttflushtstderrtclosetostforktexittOSErrortwriteterrnotstrerrortchdirtumasktsetsidtfiletdup2tfilenotstdin(RRRtpidtetsitsotse((s0/home/sa3ruby/intertwingly.net/test/daemonize.pyt daemonizes4            cCs£ddk}tiidtiƒƒtiidƒtiidƒd}xPtiid||i|iƒƒfƒtiiƒ|d}|i dƒqOdS( soThis is an example main function run by the daemon. This prints a count and timestamp once per second. iÿÿÿÿNsDaemon started with pid %d sDaemon stdout output sDaemon stderr output is%d: %s i( ttimeRRR RtgetpidRtctimeRtsleep(Rtc((s0/home/sa3ruby/intertwingly.net/test/daemonize.pytmainEs )  t__main__s/tmp/daemon.log(RRRR t__name__(((s0/home/sa3ruby/intertwingly.net/test/daemonize.pyts 1