From: Eli Zaretskii <eliz@gnu.org>
To: gdb-patches@sourceware.org
Subject: Re: [RFC] gdb/testsuite/gdb.base/fileio.exp patch for cygwin
Date: Wed, 05 Dec 2007 19:19:00 -0000 [thread overview]
Message-ID: <u1wa1yom9.fsf@gnu.org> (raw)
In-Reply-To: <20071205101109.GA31968@calimero.vinschen.de> (message from Corinna Vinschen on Wed, 5 Dec 2007 11:11:09 +0100)
> Date: Wed, 5 Dec 2007 11:11:09 +0100
> From: Corinna Vinschen <vinschen@redhat.com>
>
> If you start a Cygwin process from another application using native
> Windows functions (CreateProcess, etc), the whole fork/exec magic is
> missing, apparently. One result is that the child process has to
> figure out what the stdin/out/err streams are, using native Windows
> functions. Since native Windows functions have no idea what a pseudo
> tty is, the information returned is that stdio streams are connected
> to pipes. So the child thinks its stdio streams are just pipes and
> pipes are not ttys, apparently.
I don't know if this is relevant (probably not), but please note that
native Windows implementation of `isatty' does not faithfully emulates
Posix functionality: it returns non-zero on _any_character_device_,
not just on a terminal. For example, try redirecting to/from the null
device.
My grabbag of workarounds for Windows gotcha's includes this:
#define ISATTY(fd) (isatty(fd) && lseek(fd,SEEK_CUR,0) == -1)
next prev parent reply other threads:[~2007-12-05 18:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 10:02 Pierre Muller
2007-12-04 23:50 ` Pedro Alves
2007-12-05 9:22 ` Pierre Muller
2007-12-05 22:56 ` Pedro Alves
2007-12-05 12:17 ` Corinna Vinschen
2007-12-05 19:19 ` Eli Zaretskii [this message]
2007-12-05 23:01 ` Pedro Alves
2007-12-06 1:06 ` Daniel Jacobowitz
2007-12-06 3:42 ` Pedro Alves
2007-12-06 4:25 ` Pedro Alves
2007-12-06 11:21 ` Corinna Vinschen
2007-12-07 13:54 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u1wa1yom9.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox