Hi there,
I have a script where I log stuff to a file and the same time displays
it to stdout using Log4perl.
Here is a minimal example where I log a command which fails.
snip-
#! /usr/bin/perl
use strict;
use warnings;
#use autodie;
use
Manfred Lotz wrote:
Hi there,
I have a script where I log stuff to a file and the same time displays
it to stdout using Log4perl.
Here is a minimal example where I log a command which fails.
snip-
#! /usr/bin/perl
use strict;
use warnings;
On Wed, May 1, 2013 at 9:22 AM, Manfred Lotz manfred.l...@arcor.de wrote:
have a script where I log stuff to a file and the same time displays
it to stdout using Log4perl.
If you use the autodie perldoc example code:
eval {
close($fh);
};
if
On Wed, 1 May 2013 07:58:38 -0700
Ron Bergin r...@i.frys.com wrote:
Manfred Lotz wrote:
Hi there,
I have a script where I log stuff to a file and the same time
displays it to stdout using Log4perl.
Here is a minimal example where I log a command which fails.
On Wed, May 01, 2013 at 04:22:42PM +0200, Manfred Lotz wrote:
Hi there,
Hello,
I have a script where I log stuff to a file and the same time displays
it to stdout using Log4perl.
Here is a minimal example where I log a command which fails.
On Wed, 1 May 2013 10:04:15 -0500
Andy Bach afb...@gmail.com wrote:
On Wed, May 1, 2013 at 9:22 AM, Manfred Lotz manfred.l...@arcor.de
wrote:
have a script where I log stuff to a file and the same time displays
it to stdout using Log4perl.
If you use the autodie perldoc example code:
On Wed, May 01, 2013 at 11:45:00AM -0400, Brandon McCaig wrote:
One thing that I know bit me with the 'or die' pattern is that
with a pipe if the child process exits with an non-zero exit
status then close returns undef, ...
Sorry, close returns false to signal failure, not undef.
close
On Wed, May 1, 2013 at 10:45 AM, Brandon McCaig bamcc...@gmail.com wrote:
One thing that I know bit me with the 'or die' pattern is that
with a pipe if the child process exits with an non-zero exit
status then close returns undef, even though there is really no
problem closing the pipe.
On Wed, 1 May 2013 11:50:05 -0400
Brandon McCaig bamcc...@gmail.com wrote:
On Wed, May 01, 2013 at 11:45:00AM -0400, Brandon McCaig wrote:
One thing that I know bit me with the 'or die' pattern is that
with a pipe if the child process exits with an non-zero exit
status then close returns
...
Thanks for your detailed explanations. I think that close should work
as I cannot see any reason why a failure of a command closes the pipe
prematurely.
Actually, everything is ok until the close which checks both the
status from reaping the child and the close itself:
The open can
On Wed, 1 May 2013 12:00:18 -0700
Charles DeRykus dery...@gmail.com wrote:
...
Thanks for your detailed explanations. I think that close should
work as I cannot see any reason why a failure of a command closes
the pipe prematurely.
Actually, everything is ok until the close which
On Wed, May 1, 2013 at 12:57 PM, Manfred Lotz manfred.l...@arcor.de wrote:
On Wed, 1 May 2013 12:00:18 -0700
Charles DeRykus dery...@gmail.com wrote:
...
Thanks for your detailed explanations. I think that close should
work as I cannot see any reason why a failure of a command closes
On Wed, 1 May 2013 14:57:34 -0700
Charles DeRykus dery...@gmail.com wrote:
On Wed, May 1, 2013 at 12:57 PM, Manfred Lotz manfred.l...@arcor.de
wrote:
On Wed, 1 May 2013 12:00:18 -0700
Charles DeRykus dery...@gmail.com wrote:
...
Thanks for your detailed explanations. I think
13 matches
Mail list logo