in reply to fileno unexpectly returns undef
To elaborate on what tye said: due to the stringification problem, lexical file handles can't be used with the "<&" / ">&" feature. Use "old-style" file handles instead:
socketpair(STDERRCHILDWRITER, STDERRCHILDREADER, AF_UNIX, SOCK_STREAM, PF_UNSPEC) || die "socketpair: $ +!";
and then specify them as ">&STDERRCHILDREADER", etc. to open3().
(Can't say, though, whether this will eventually help with your stated cross-platform goal — but it should at least get rid of the immediate problem...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: fileno unexpectly returns undef
by kees (Initiate) on Feb 24, 2012 at 11:39 UTC |