From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Opening a pty without a process Date: Tue, 27 Nov 2007 23:16:53 -0500 Message-ID: References: <18182.41657.249969.116596@kahikatea.snap.net.nz> <18251.11333.382312.936571@kahikatea.snap.net.nz> Reply-To: rms@gnu.org NNTP-Posting-Host: dough.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1196252471 25622 80.91.229.10 (28 Nov 2007 12:21:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2007 12:21:11 +0000 (UTC) Cc: nickrob@snap.net.nz, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 28 13:26:49 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from mail-forward.uio.no ([129.240.10.42]) by dough.gmane.org with esmtp (Exim 4.50) id 1IxKwb-0004hd-R8 for ged-emacs-devel@m.gmane.org; Wed, 28 Nov 2007 12:19:05 +0100 Original-Received: from mail-mx1.uio.no ([129.240.10.29]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1IxENK-0006es-Qf for ged-emacs-devel@m.gmane.org; Wed, 28 Nov 2007 05:18:14 +0100 Original-Received: from lists.gnu.org ([199.232.76.165]) by mail-mx1.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1IxEN7-0006w4-4b for ged-emacs-devel@m.gmane.org; Wed, 28 Nov 2007 05:18:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxEM7-0002d3-P6 for ged-emacs-devel@m.gmane.org; Tue, 27 Nov 2007 23:16:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IxEM3-0002co-W4 for emacs-devel@gnu.org; Tue, 27 Nov 2007 23:16:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IxEM2-0002cc-La for emacs-devel@gnu.org; Tue, 27 Nov 2007 23:16:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxEM2-0002cZ-Gg for emacs-devel@gnu.org; Tue, 27 Nov 2007 23:16:54 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IxEM2-0002NC-Gs for emacs-devel@gnu.org; Tue, 27 Nov 2007 23:16:54 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IxEM1-0002dy-P6; Tue, 27 Nov 2007 23:16:53 -0500 In-reply-to: (message from Stefan Monnier on Tue, 27 Nov 2007 10:36:57 -0500) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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 X-UiO-SPF-Received: Received-SPF: pass (mail-mx1.uio.no: domain of gnu.org designates 199.232.76.165 as permitted sender) client-ip=199.232.76.165; envelope-from=emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org; helo=lists.gnu.org; X-UiO-ClamAV-Virus: No X-UiO-Spam-info: not spam, SpamAssassin (score=-0.5, required=5.0, autolearn=disabled, AWL=0.494,RCVD_IN_DNSWL_LOW=-1) X-UiO-Scanned: AFA7AAE31EA744ED85BE3D04A404E80B4B2A1A71 X-UiO-SPAM-Test: remote_host: 199.232.76.165 spam_score: -4 maxlevel 200 minaction 2 bait 0 mail/h: 63 total 27270 max/h 63 blacklist 0 greylist 0 ratelimit 0 Xref: news.gmane.org gmane.emacs.devel:84232 Archived-At: (defun open-pty-buffer (buffer) (let* ((process-connection-type 'pty) (proc (start-process "foo" buffer "sh" "-c" "while sleep 3600; do :; done"))) (process-tty-name proc))) I guess it would be convenient indeed to be able to use nil for the program rather than a contraption like the one above. OTOH we could just use `hexl' by adding a flag to it (it's already abused in a similar way by `ielm'). I think it would be much cleaner to do this at C level and dispense with the need to run any program in this pty.