Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Leaking a file descriptor into a child to use with /proc/self/fd/3by ewheeler (Novice) |
on Feb 25, 2020 at 00:42 UTC ( [id://11113376]=perlquestion: print w/replies, xml ) | Need Help?? |
ewheeler has asked for the wisdom of the Perl Monks concerning the following question: We are trying to open a file descriptor and access it from a forked + exec child. It works in bash as follows:
When we test with perl using the code below, grep complains about fd/3 not existing.
What am I missing, is fork or exec closing the leaked file descriptor? -Eric
Back to
Seekers of Perl Wisdom
|
|