unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Cc: help-gnu-emacs@gnu.org, Jason Rumney <jasonr@f2s.com>,
	Emacs Devel <emacs-devel@gnu.org>
Subject: Re: asynchronous process management on WinWP; buffering problem?
Date: Sat, 15 Apr 2006 19:54:54 +0200	[thread overview]
Message-ID: <m3y7y667wx.fsf@seneca.benny.turtle-trading.net> (raw)
In-Reply-To: <444110BE.3050009@student.lu.se> (Lennart Borgman's message of "Sat, 15 Apr 2006 17:26:54 +0200")

Hi Lennart,


Lennart Borgman writes:
> It actually seems like is _isatty is defined in MinGW. I just tested
> a small program I found here:

The function isatty is defined in the Microsoft C runtime, and that is
what Mingw uses.  This version of isatty determines if a program is
running with stdin/stdout connected to an MS Windows console.

The way that consoles are implemented and used in MS Windows makes it
very complicated to use the console API to simulate a terminal in
Emacs.  On Unix-like systems this is done by so-called "pseudo-ttys",
"pty", but the MS Windows consoles are quite different beasts at the
OS API level.  Emacs would have to do a large amount of
reverse-engineering of the intent of the child process, to do with
consoles what Emacs does quite naturally on Unix with pseudo-ttys, and
there would still be features missing.  Therefore Emacs just uses
anonymous pipes instead which are a much better fit for the way Emacs
treats child processes, but that means that it can't make isatty in
child processes return true.

Cygwin can implement pseudo-ttys if it controls the parent as well as
the child, e.g. when you call a Cygwin program from a Cygwin compiled
Emacs.  It uses its own conventions to do that which are not
understood by non-Cygwin programs.


Sometimes you have a program that uses isatty to determine if it
should work in interactive mode or not, like the command shells of a
programming language or the some SQL interpreters.  In those cases you
will need to find a way put it into interactive mode without the help
of isatty.  Sometimes the shell will have a command-line option for
that, in other cases it can be configured after its start.


benny

  reply	other threads:[~2006-04-15 17:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <10m877fael0h3.1kg7y6ljn4qmb$.dlg@40tude.net>
     [not found] ` <443fdf5c$1@kcnews01>
     [not found]   ` <mailman.414.1145041920.9609.help-gnu-emacs@gnu.org>
     [not found]     ` <877j5r3ogd.fsf@catnip.gol.com>
     [not found]       ` <mailman.434.1145085136.9609.help-gnu-emacs@gnu.org>
     [not found]         ` <u8xq7jizt.fsf@jasonrumney.net>
2006-04-15 15:26           ` asynchronous process management on WinWP; buffering problem? Lennart Borgman
2006-04-15 17:54             ` Benjamin Riefenstahl [this message]
2006-04-15 23:50               ` Lennart Borgman
2006-04-17 13:08                 ` Benjamin Riefenstahl
2006-04-17 16:02                   ` Lennart Borgman

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3y7y667wx.fsf@seneca.benny.turtle-trading.net \
    --to=b.riefenstahl@turtle-trading.net \
    --cc=emacs-devel@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=jasonr@f2s.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).