Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Tieing STDERR to a textbox causes the IPC::Run start function to fail

by ikegami (Patriarch)
on Mar 06, 2026 at 04:21 UTC ( [id://11167406]=note: print w/replies, xml ) Need Help??


in reply to Re: Tieing STDERR to a textbox causes the IPC::Run start function to fail
in thread Tieing STDERR to a textbox causes the IPC::Run start function to fail

Indeed, there's this:

sub _debug_fd { return fileno STDERR unless defined $cur_self; if ( _debugging && !defined $cur_self->{DEBUG_FD} ) { my $fd = select STDERR; $| = 1; select $fd; $cur_self->{DEBUG_FD} = POSIX::dup fileno STDERR; _debug("debugging fd is $cur_self->{DEBUG_FD}\n") if _debugging_details; } return fileno STDERR unless defined $cur_self->{DEBUG_FD}; return $cur_self->{DEBUG_FD}; }

It's called a number of places as follows or similar:

$op->open_pipe( $self->_debug_fd )

It seems it's used to provide a means for post-fork but pre-exec code in the child to display debug messages without causing issues if the child's STDERR is redirected. For example, you wouldn't want some of the debug messages of run \@cmd, "2>", "err.txt" to end up on STDERR and some of them to end up in `err.txt`.

Replies are listed 'Best First'.
Re^3: Tieing STDERR to a textbox causes the IPC::Run start function to fail
by CrashBlossom (Beadle) on Mar 06, 2026 at 13:50 UTC

    That makes sense - thanks very much!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2026-04-18 22:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.