2 thoughts on “Daemonize Anything

  1. If you want to redirect all the output of the program to a file, you don't need to fork yet another process with <code>popen()</code>:

    freopen( "/path/to/logfile", "a", stdout);

    freopen( "/path/to/logfile", "a", stderr);

    exec[l|v]p( command, … );

    Thus you can get both stdout and stderr, you don't spawn another process and you don't open and close the log file on every 1024 chars. Of course, the error checking was omitted 🙂

  2. Hey man, it's Nu!! Are the IRC's still in one piece anywhere? Lookin' to get ahold of a few people, Aly, EE, etc…

    Stop by and leave a comment on my site (now: WinBreak.com) or just look me on on a messenger service:

    AIM: RotatingFlavors

    MSN: [email protected]

Leave a Reply