From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: ^D is broken in shell-mode Date: Wed, 09 Jun 2010 10:06:11 +0900 Message-ID: <8739wxj9q4.fsf@catnip.gol.com> References: Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1276045584 15162 80.91.229.12 (9 Jun 2010 01:06:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Jun 2010 01:06:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 09 03:06:23 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OM9kM-00060q-SQ for ged-emacs-devel@m.gmane.org; Wed, 09 Jun 2010 03:06:23 +0200 Original-Received: from localhost ([127.0.0.1]:53619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OM9kM-0005Lt-63 for ged-emacs-devel@m.gmane.org; Tue, 08 Jun 2010 21:06:22 -0400 Original-Received: from [140.186.70.92] (port=55813 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OM9kG-0005Kx-IM for emacs-devel@gnu.org; Tue, 08 Jun 2010 21:06:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OM9kF-0006en-5V for emacs-devel@gnu.org; Tue, 08 Jun 2010 21:06:16 -0400 Original-Received: from smtp11.dentaku.gol.com ([203.216.5.73]:45297) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OM9kE-0006eP-UK; Tue, 08 Jun 2010 21:06:15 -0400 Original-Received: from 218.231.154.7.eo.eaccess.ne.jp ([218.231.154.7] helo=catnip.gol.com) by smtp11.dentaku.gol.com with esmtpa (Dentaku) id 1OM9kC-0003Zl-1N; Wed, 09 Jun 2010 10:06:12 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 41DABDF8B; Wed, 9 Jun 2010 10:06:11 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: (Stefan Monnier's message of "Tue, 08 Jun 2010 16:22:41 -0400") Original-Lines: 28 X-Virus-Scanned: ClamAV GOL (outbound) X-Abuse-Complaints: abuse@gol.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125648 Archived-At: Stefan Monnier writes: >> It's been a long time since I did pty programming, but I seem to recall >> that at least in some pty states, doing a zero-length write in the pty >> master will send an end-of-file to the slave tty. I don't recall the >> details though... > > I really wish someone could help. At least if someone could point me to > some kind of documentation that would be very helpful. The best "doc" > I could find so far is the xterm source code, which I do not really > understand and whose behavior I haven't been able to reproduce yet > (e.g. it seems not to disable ICANON mode, and it doesn't seem to ever > send EOF either, even when sending large chunks of data, yet that data > doesn't get truncated, whereas when I try to to make Emacs send large > amounts of data in ICANON mode without EOFs, it gets truncated). I may be thinking of TIOCREMOTE (from the solaris man page: "In normal usage, a write of data is like the data typed as a line on the terminal; a write of 0 bytes is like typing an EOF character"), but unfortunately on linux the tty_ioctl man page says: "The BSD ioctls TIOCSTOP, TIOCSTART, TIOCUCNTL, TIOCREMOTE have not been implemented under Linux." Still I'd think there would be some sort of equivalent functionality... -Miles -- Happiness, n. An agreeable sensation arising from contemplating the misery of another.