in reply to how to catch STDOUT from an external app, that never exits?
The problem is that the program (and file handles) work differently than you think :
Under Linux and possibly also under Windows NT and higher, you can rename the file while it is still open, depending on the open mode / locking mode (there is a savelogs script that does just that). If this does not work with the external program, you will have to stop and restart the application to rotate the logfile.
Update: Fixed link, thanks to Tomte
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: how to cath STDOUT from an external app, that never exits?
by ThorstenHirsch (Novice) on Apr 09, 2003 at 09:06 UTC | |
by Corion (Patriarch) on Apr 09, 2003 at 10:33 UTC | |
by ThorstenHirsch (Novice) on Apr 09, 2003 at 12:13 UTC |