Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Sending STDERR to a filehandle

by ozone (Friar)
on Jun 10, 2003 at 08:27 UTC ( #264572=note: print w/replies, xml ) Need Help??


in reply to Sending STDERR to a filehandle

change:
$pid = open(ERROR, "$cmd 2>&1 1>/dev/null |");
to
$pid = open(ERROR, "$cmd 1>/dev/null 2>&1 |");
I know that in Unix, putting them the wrong way around causes the same symptoms you are talking about.

Replies are listed 'Best First'.
Re: Re: Sending STDERR to a filehandle
by bobn (Chaplain) on Jun 10, 2003 at 17:08 UTC
    Actually, you're the one that has it backwards. Although most things hapopen letf-to-right, I've always found tht redirections happen right to left. Hence, you've arranged for STDOUT and STDERR both to go to /dev/null.

    --Bob Niederman, http://bob-n.com

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://264572]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-05-29 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?