Commit 875e6b94 authored by Karl Heuer's avatar Karl Heuer
Browse files

(create_process): Don't reference pty_name if !HAVE_PTYS.

parent 5b3f1224
...@@ -248,12 +248,11 @@ static Lisp_Object get_process (); ...@@ -248,12 +248,11 @@ static Lisp_Object get_process ();
/* Maximum number of bytes to send to a pty without an eof. */ /* Maximum number of bytes to send to a pty without an eof. */
static int pty_max_bytes; static int pty_max_bytes;
/* Open an available pty, returning a file descriptor. #ifdef HAVE_PTYS
Return -1 on failure. /* The file name of the pty opened by allocate_pty. */
The file name of the terminal corresponding to the pty
is left in the variable pty_name. */
static char pty_name[24]; static char pty_name[24];
#endif
/* Compute the Lisp form of the process status, p->status, from /* Compute the Lisp form of the process status, p->status, from
the numeric status that was returned by `wait'. */ the numeric status that was returned by `wait'. */
...@@ -363,6 +362,11 @@ status_message (status) ...@@ -363,6 +362,11 @@ status_message (status)
#ifdef HAVE_PTYS #ifdef HAVE_PTYS
/* Open an available pty, returning a file descriptor.
Return -1 on failure.
The file name of the terminal corresponding to the pty
is left in the variable pty_name. */
int int
allocate_pty () allocate_pty ()
{ {
...@@ -1499,7 +1503,12 @@ create_process (process, new_argv, current_dir) ...@@ -1499,7 +1503,12 @@ create_process (process, new_argv, current_dir)
if (forkin != forkout && forkout >= 0) if (forkin != forkout && forkout >= 0)
close (forkout); close (forkout);
XPROCESS (process)->tty_name = pty_flag ? build_string (pty_name) : Qnil; #ifdef HAVE_PTYS
if (pty_flag)
XPROCESS (process)->tty_name = build_string (pty_name);
else
#endif
XPROCESS (process)->tty_name = Qnil;
#ifdef SIGCHLD #ifdef SIGCHLD
#ifdef BSD4_1 #ifdef BSD4_1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment