This is the mail archive of the
mailing list for the Cygwin project.
freopen irritates system-call/sh.exe
- From: Jens Wilken <Jens dot Wilken at osc-es dot de>
- To: Cygwin MailList <cygwin at cygwin dot com>
- Date: Thu, 30 Mar 2006 15:36:23 +0200
- Subject: freopen irritates system-call/sh.exe
- Reply-to: Jens dot Wilken at osc-es dot de
-----BEGIN PGP SIGNED MESSAGE-----
I posted a question a few days before, about sh.exe poping up
console-windows. I found out, that the use of
freopen causes the problem. So here is my modified question:
How does freopen-ing stdout and stderr affect subsequent "system" calls?
There must have been a change between Cygwin 1.5.10 and 1.5.19,
because the console windows didn't show up in Cygwin 1.5.10.
The freopen manpage states, that the original stream is closed when it
is assigned to the new file. So does freopen try to close the original
console output and what is the effect?
I'm sorry that I can't ask clearer or more specific but I'm really
puzzled by this. It is possible to rewite the code that contains
freopen with dup, dup2 calls but I'd like to understand what happened.
Dipl. Inform. Jens Wilken
OSC Embedded Systems AG
26121 Oldenburg - Germany
Tel.: +49-441-350 42-0
Fax.: +49-441-350 42-364
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html