aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman1995-04-24 05:52:11 +0000
committerRichard M. Stallman1995-04-24 05:52:11 +0000
commit4aa54ba87234d07006f25ac325f04ee508b9026a (patch)
tree784662f542349b6464aac2a05e3d25870af4b1bc /src/process.c
parentd20b8af682d2e0413239d47ba2ecb30a41dec771 (diff)
downloademacs-4aa54ba87234d07006f25ac325f04ee508b9026a.tar.gz
emacs-4aa54ba87234d07006f25ac325f04ee508b9026a.zip
(create_process): Don't abort if can't reopen
pty_name in the child. Exit the child instead.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c
index 3d1ae0ee000..83de691d393 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1412,13 +1412,18 @@ create_process (process, new_argv, current_dir)
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