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 |