in reply to Re: Can't daemonize because STDIN/STDOUT not detatched?
in thread Can't daemonize because STDIN/STDOUT not detatched?

Good catch, It backgrounded. what is the secret behind? I also would like to see print result from terminal
while(<$p0f>) { print if /Linux/; }
which standard handle I should keep open for child, STDERR or STDOUT? and How?

Replies are listed 'Best First'.
Re^3: Can't daemonize because STDIN/STDOUT not detatched?
by Joost (Canon) on May 02, 2007 at 21:37 UTC
    I don't know what you're trying to do here. Daemonizing implies you don't have, want and use STDOUT STDIN and STDERR.

    So, either use STDOUT or don't daemonize. If you only want to run the process in the background while still polluting your STDOUT for some strange reason, just fork(), or (probably better) start the process in the background from the shell.

      I want to debug what is in the socket, and I can see from the terminal. Commented out the #    open STDOUT, '>/dev/null' or die "Can't write to /dev/null: $!"; seems get the result I want, but i am not sure if it is the right way to do :)