in reply to Re^3: saving a file using a temporary file's handle
in thread saving a file using a temporary file's handle
I think the answer to your quandry is given in the warnings section of File::Temp where it says:
You will have to clear the close-on-exec bit on that file descriptor before passing it to another process. use Fcntl qw/F_SETFD F_GETFD/; fcntl($tmpfh, F_SETFD, 0) or die "Can't clear close-on-exec flag on temp fh: $!\n";
|
|---|