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
next prev parent reply other threads:[~2006-04-15 17:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-14 7:14 asynchronous process management on WinWP; buffering problem? Peter Tury
2006-04-14 17:43 ` kgold
2006-04-14 19:11 ` Lennart Borgman
[not found] ` <mailman.414.1145041920.9609.help-gnu-emacs@gnu.org>
2006-04-14 20:13 ` Miles Bader
2006-04-15 7:12 ` Lennart Borgman
[not found] ` <mailman.434.1145085136.9609.help-gnu-emacs@gnu.org>
2006-04-15 9:17 ` Jason Rumney
2006-04-15 15:26 ` 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
[not found] ` <mailman.460.1145145017.9609.help-gnu-emacs@gnu.org>
2006-04-16 0:21 ` Miles Bader
2006-04-16 7:15 ` Eli Zaretskii
[not found] ` <mailman.437.1145114823.9609.help-gnu-emacs@gnu.org>
2006-04-15 23:30 ` Miles Bader
2006-04-14 20:42 ` Jason Rumney
2006-04-15 20:56 ` Peter Tury
2006-04-19 15:05 ` Peter Tury
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.
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).