emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening a pty without a process


From: Stefan Monnier
Subject: Re: Opening a pty without a process
Date: Tue, 27 Nov 2007 10:36:57 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>> (open-pty-buffer buffer)
-> "/dev/pts/1"

How 'bout:

   (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').

BTW in your patch I do not understand where the create_pty code comes
from.  It seems to come from Emacs code, in which case it is code
duplication and should be avoided.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]