comparison src/process.c @ 11514:321726163a65

(create_process): Don't abort if can't reopen pty_name in the child. Exit the child instead.
author Richard M. Stallman <rms@gnu.org>
date Mon, 24 Apr 1995 05:52:11 +0000
parents 44f6ea27bac4
children 3b2dacb1bfe9
comparison
equal deleted inserted replaced
11513:41e01a3ef4f0 11514:321726163a65
1410 /* I wonder if close (open (pty_name, ...)) would work? */ 1410 /* I wonder if close (open (pty_name, ...)) would work? */
1411 if (xforkin >= 0) 1411 if (xforkin >= 0)
1412 close (xforkin); 1412 close (xforkin);
1413 xforkout = xforkin = open (pty_name, O_RDWR, 0); 1413 xforkout = xforkin = open (pty_name, O_RDWR, 0);
1414 1414
1415 if (xforkin < 0)
1416 {
1417 write (1, "Couldn't open the pty terminal ", 31);
1418 write (1, pty_name, strlen (pty_name));
1419 write (1, "\n", 1);
1420 _exit (1);
1421 }
1422
1415 #ifdef SET_CHILD_PTY_PGRP 1423 #ifdef SET_CHILD_PTY_PGRP
1416 ioctl (xforkin, TIOCSPGRP, &pgrp); 1424 ioctl (xforkin, TIOCSPGRP, &pgrp);
1417 ioctl (xforkout, TIOCSPGRP, &pgrp); 1425 ioctl (xforkout, TIOCSPGRP, &pgrp);
1418 #endif 1426 #endif
1419
1420 if (xforkin < 0)
1421 abort ();
1422 } 1427 }
1423 #endif /* not UNIPLUS and not RTU */ 1428 #endif /* not UNIPLUS and not RTU */
1424 #ifdef SETUP_SLAVE_PTY 1429 #ifdef SETUP_SLAVE_PTY
1425 if (pty_flag) 1430 if (pty_flag)
1426 { 1431 {