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: Sat, 15 Apr 2006 17:26:54 +0200 Message-ID: <444110BE.3050009@student.lu.se> References: <10m877fael0h3.1kg7y6ljn4qmb$.dlg@40tude.net> <443fdf5c$1@kcnews01> <877j5r3ogd.fsf@catnip.gol.com> 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 1145114841 25503 80.91.229.2 (15 Apr 2006 15:27:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Apr 2006 15:27:21 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Emacs Devel Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 15 17:27:18 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 1FUmg7-0000Ru-R4 for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Apr 2006 17:27:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUmg7-00088o-3D for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Apr 2006 11:27:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FUmfs-00084F-Of for help-gnu-emacs@gnu.org; Sat, 15 Apr 2006 11:27:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FUmfq-00081M-1r for help-gnu-emacs@gnu.org; Sat, 15 Apr 2006 11:26:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUmfp-00080t-QN; Sat, 15 Apr 2006 11:26:57 -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 1FUmg3-0007sk-JV; Sat, 15 Apr 2006 11:27:11 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn1.fre.skanova.net (7.2.070) id 443D09280008417E; Sat, 15 Apr 2006 17:26:55 +0200 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: Jason Rumney 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:34377 gmane.emacs.devel:52893 Archived-At: Jason Rumney wrote: > Lennart Borgman writes: > > >> Can Emacs then tell _isatty that it is a terminal? Or what does Emacs >> do to handle this? >> >> >> Note: It looks like the POSIX name now is _isatty. >> > > Probably not on Windows, since windows isn't POSIX and any POSIX layer > that MingW32 has is unlikely to add functionality that is not already > possible through other Windows APIs. On Windows stdout uses completely > different API calls than console I/O. > It actually seems like is _isatty is defined in MinGW. I just tested a small program I found here: http://permalink.gmane.org/gmane.comp.gnu.mingw.msys/448 #include int main(int argc, char *argv[]) { if (isatty(fileno(stdin)) && _isatty(fileno(stdout))) printf("interactive\n"); else printf("batch\n"); return 0; } If I run this program in cmd.exe it says "interactive". I get the same result under MSYS and Cygwin. However running it in Emacs in shell: M-x shell it instead says "batch". (This is in the CVS version of Emacs.) Is this what is expected?