Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org
Subject: Re: [RFC] gdb/testsuite/gdb.base/fileio.exp patch for cygwin
Date: Wed, 05 Dec 2007 23:01:00 -0000	[thread overview]
Message-ID: <47572C95.9030804@portugalmail.pt> (raw)
In-Reply-To: <20071205101109.GA31968@calimero.vinschen.de>

Corinna Vinschen wrote:
> 
> Right.  The problem occurs when running a session in a pseudo tty like
> when starting GDB in a ssh session or when you set CYGWIN=tty before
> starting the first Cygwin process (the shell, usually) in a Windows
> console window.
> 
> Pseudo ttys are implemented in Cygwin using pipes.  When you start a
> Cygwin application with fork/exec, the knowledge about this pipes (being
> a pseudo tty) is inherited by the child process by means of the fork/
> exec magic.
> 
> 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.
> 
> 

Thank you very much for the explanation.

Isn't there a shared memory section amongst all loaded
copies of cygwin1.dll?  Can't that be used to reconstruct
the pseudo ttys from the pipes?

-- 
Pedro Alves


  parent reply	other threads:[~2007-12-05 22:56 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
2007-12-05 23:01     ` Pedro Alves [this message]
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=47572C95.9030804@portugalmail.pt \
    --to=pedro_alves@portugalmail.pt \
    --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