diff options
| author | Karl Heuer | 1995-04-28 01:43:02 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-04-28 01:43:02 +0000 |
| commit | 875e6b94f1e2f264718999352749fbcbe67575ac (patch) | |
| tree | 5e089e82502e2521d0754eca3aabf0ee4e7bf8f6 /src/process.c | |
| parent | 5b3f12245641e16c7097db6058333d9ffbba7152 (diff) | |
| download | emacs-875e6b94f1e2f264718999352749fbcbe67575ac.tar.gz emacs-875e6b94f1e2f264718999352749fbcbe67575ac.zip | |
(create_process): Don't reference pty_name if !HAVE_PTYS.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/process.c b/src/process.c index 83de691d393..14fa3144339 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -248,12 +248,11 @@ static Lisp_Object get_process (); | |||
| 248 | /* Maximum number of bytes to send to a pty without an eof. */ | 248 | /* Maximum number of bytes to send to a pty without an eof. */ |
| 249 | static int pty_max_bytes; | 249 | static int pty_max_bytes; |
| 250 | 250 | ||
| 251 | /* Open an available pty, returning a file descriptor. | 251 | #ifdef HAVE_PTYS |
| 252 | Return -1 on failure. | 252 | /* The file name of the pty opened by allocate_pty. */ |
| 253 | The file name of the terminal corresponding to the pty | ||
| 254 | is left in the variable pty_name. */ | ||
| 255 | 253 | ||
| 256 | static char pty_name[24]; | 254 | static char pty_name[24]; |
| 255 | #endif | ||
| 257 | 256 | ||
| 258 | /* Compute the Lisp form of the process status, p->status, from | 257 | /* Compute the Lisp form of the process status, p->status, from |
| 259 | the numeric status that was returned by `wait'. */ | 258 | the numeric status that was returned by `wait'. */ |
| @@ -363,6 +362,11 @@ status_message (status) | |||
| 363 | 362 | ||
| 364 | #ifdef HAVE_PTYS | 363 | #ifdef HAVE_PTYS |
| 365 | 364 | ||
| 365 | /* Open an available pty, returning a file descriptor. | ||
| 366 | Return -1 on failure. | ||
| 367 | The file name of the terminal corresponding to the pty | ||
| 368 | is left in the variable pty_name. */ | ||
| 369 | |||
| 366 | int | 370 | int |
| 367 | allocate_pty () | 371 | allocate_pty () |
| 368 | { | 372 | { |
| @@ -1499,7 +1503,12 @@ create_process (process, new_argv, current_dir) | |||
| 1499 | if (forkin != forkout && forkout >= 0) | 1503 | if (forkin != forkout && forkout >= 0) |
| 1500 | close (forkout); | 1504 | close (forkout); |
| 1501 | 1505 | ||
| 1502 | XPROCESS (process)->tty_name = pty_flag ? build_string (pty_name) : Qnil; | 1506 | #ifdef HAVE_PTYS |
| 1507 | if (pty_flag) | ||
| 1508 | XPROCESS (process)->tty_name = build_string (pty_name); | ||
| 1509 | else | ||
| 1510 | #endif | ||
| 1511 | XPROCESS (process)->tty_name = Qnil; | ||
| 1503 | 1512 | ||
| 1504 | #ifdef SIGCHLD | 1513 | #ifdef SIGCHLD |
| 1505 | #ifdef BSD4_1 | 1514 | #ifdef BSD4_1 |