>
>* If it's started in a terminal, the output will appear in that
>terminal, even if started in background and with nohup(1).
>
>* If it's started by cron(1), the output is gathered and e-mail to you
>when the program terminates.
>
>* If it's started by init(1), the output is send to the console log.
En?I think you are a little poor at daemon programming.
See this example coming from Lincold Stein's book:
-----------------
daemon();
do something...
sub daemon
{
my $child = fork();
die "can't fork" unless defined $child;
exit 0 if $child;
setsid();
open (STDIN, "</dev/null");
open (STDOUT, ">/dev/null");
open (STDERR,">&STDOUT");
chdir $rundir;
umask(022);
$ENV{PATH}='/bin:/usr/bin:/sbin:/usr/sbin';
return $$;
}
--------------------
Do you still believe you can see the error output on screen?
--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>