From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Opening a pty without a process Date: Sat, 6 Oct 2007 08:46:48 +1200 Message-ID: <18182.41657.249969.116596@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1191617261 22821 80.91.229.12 (5 Oct 2007 20:47:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Oct 2007 20:47:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 05 22:47:36 2007 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.50) id 1Idu51-00034I-Q5 for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2007 22:47:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Idu4w-00059L-Uu for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2007 16:47:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Idu4s-00053f-BV for emacs-devel@gnu.org; Fri, 05 Oct 2007 16:47:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Idu4r-00050d-2I for emacs-devel@gnu.org; Fri, 05 Oct 2007 16:47:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Idu4q-00050I-UR for emacs-devel@gnu.org; Fri, 05 Oct 2007 16:47:16 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Idu4q-00021m-CG for emacs-devel@gnu.org; Fri, 05 Oct 2007 16:47:16 -0400 Original-Received: from kahikatea.snap.net.nz (19.63.255.123.dynamic.snap.net.nz [123.255.63.19]) by viper.snap.net.nz (Postfix) with ESMTP id 447F13DA356 for ; Sat, 6 Oct 2007 09:46:54 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 37C408FC6D; Sat, 6 Oct 2007 08:46:50 +1200 (NZST) X-Mailer: VM 7.19 under Emacs 23.0.50.21 X-Detected-Kernel: Linux 2.4-2.6 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:80309 Archived-At: I would like to associate a buffer with a pty without a process. How easy would it be able to adapt start-process to do this when given a nil value for program name: (start-process name buffer nil) or (start-process name buffer) Perhaps a new function would be better because I would like it to return the name of the pty, e.g, (open-pty-buffer buffer) ->"/dev/pts/1" Emacs would need then to monitor the file descriptor using select in wait_reading_process_output (process.c). and I would hook this up with a process using: M-x gdb Run gdb (like this): gdb -tty /dev/pts/1 -i=mi myprog (In practice it's more likely that Emacs will set a Lisp variable to the value of (open-pty-buffer buffer) and use it behind the users back.) -- Nick http://www.inet.net.nz/~nickrob