www.delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-workers-bounces using -f |
Date: | Mon, 28 Jan 2002 12:29:04 +0100 |
From: | Laszlo Molnar <laszlo DOT molnar AT eth DOT ericsson DOT se> |
To: | DJGPP Workers List <djgpp-workers AT delorie DOT com> |
Subject: | redirection problem with perl |
Message-ID: | <20020128122904.R5722@libra.eth.ericsson.se> |
Mime-Version: | 1.0 |
User-Agent: | Mutt/1.2i |
Reply-To: | djgpp-workers AT delorie DOT com |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |