delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/30/08:36:44

X-Spam-Check-By: sourceware.org
Message-ID: <442BDED7.6020107@osc-es.de>
Date: Thu, 30 Mar 2006 15:36:23 +0200
From: Jens Wilken <Jens DOT Wilken AT osc-es DOT de>
Reply-To: Jens DOT Wilken AT osc-es DOT de
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
To: Cygwin MailList <cygwin AT cygwin DOT com>
Subject: freopen irritates system-call/sh.exe
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Hi,
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.

Regards
    Jens

- --
Dipl. Inform. Jens Wilken
Software Developer
OSC Embedded Systems AG
Industriestr. 11
26121 Oldenburg - Germany

Mail: Jens DOT Wilken AT osc-es DOT de
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
 
iD8DBQFEK97X/nbz2tIAgUQRAoiSAKCQ+O1Rok7Fz4DjgcanOPCTO8JdGACeJxFl
EHed8bRIlMqlhaxnag3vQho=
=wHLS
-----END PGP SIGNATURE-----



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019