Mail Archives: djgpp-workers/2002/01/28/06:29:26
Hi Folks,
Finally I've found the cause of the redirection failures with perl that
I've reported some weeks ago. The problem is that perl duplicates a
stream like this:
old_h = fileno(old_stream)
old_mode = fcntl(old_h, F_GETFL)
new_stream = fdopen(dup(old_h), mode_to_string(old_mode))
This fails because this fcntl call always returns 0, which means fdopen
is always called with "r" as the mode.
Any idea to work around this?
Thanks, Laszlo
- Raw text -