From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help,gmane.emacs.devel Subject: Re: asynchronous process management on WinWP; buffering problem? Date: Sun, 16 Apr 2006 01:50:09 +0200 Message-ID: <444186B1.9080502@student.lu.se> References: <10m877fael0h3.1kg7y6ljn4qmb$.dlg@40tude.net> <443fdf5c$1@kcnews01> <877j5r3ogd.fsf@catnip.gol.com> <444110BE.3050009@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1145145036 710 80.91.229.2 (15 Apr 2006 23:50:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Apr 2006 23:50:36 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Jason Rumney , Emacs Devel Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 16 01:50:33 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FUuX7-00014e-Hr for geh-help-gnu-emacs@m.gmane.org; Sun, 16 Apr 2006 01:50:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUuX7-0003Yz-1g for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Apr 2006 19:50:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FUuWt-0003YD-Kk for help-gnu-emacs@gnu.org; Sat, 15 Apr 2006 19:50:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FUuWr-0003Xy-HV for help-gnu-emacs@gnu.org; Sat, 15 Apr 2006 19:50:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUuWr-0003Xv-C6; Sat, 15 Apr 2006 19:50:13 -0400 Original-Received: from [81.228.11.98] (helo=pne-smtpout1-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FUuXA-0008V6-38; Sat, 15 Apr 2006 19:50:32 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn1.fre.skanova.net (7.2.070) id 443D09280008ED76; Sun, 16 Apr 2006 01:50:09 +0200 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: Benjamin Riefenstahl In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34391 gmane.emacs.devel:52909 Archived-At: Hi Benny, Thanks for the good explanation. Indeed it looks difficult to fix this on the w32 platform. In my opinion w32 does not look very much POSIX conformant here. Or the POSIX specs are just too weak. Benjamin Riefenstahl wrote: > 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 >