comparison src/process.c @ 11609:3b2dacb1bfe9

(create_process): Don't reference pty_name if !HAVE_PTYS.
author Karl Heuer <kwzh@gnu.org>
date Fri, 28 Apr 1995 01:43:02 +0000
parents 321726163a65
children 0f9b9c375416
comparison
equal deleted inserted replaced
11608:23e8d67edd9d 11609:3b2dacb1bfe9
246 static Lisp_Object get_process (); 246 static Lisp_Object get_process ();
247 247
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'. */
260 259
261 Lisp_Object status_convert (); 260 Lisp_Object status_convert ();
360 else 359 else
361 return Fcopy_sequence (Fsymbol_name (symbol)); 360 return Fcopy_sequence (Fsymbol_name (symbol));
362 } 361 }
363 362
364 #ifdef HAVE_PTYS 363 #ifdef HAVE_PTYS
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. */
365 369
366 int 370 int
367 allocate_pty () 371 allocate_pty ()
368 { 372 {
369 struct stat stb; 373 struct stat stb;
1497 alarm (0); 1501 alarm (0);
1498 start_polling (); 1502 start_polling ();
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
1506 sigrelse (SIGCHLD); 1515 sigrelse (SIGCHLD);
1507 #else /* not BSD4_1 */ 1516 #else /* not BSD4_1 */