aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1995-04-24 05:52:11 +0000
committerRichard M. Stallman <[email protected]>1995-04-24 05:52:11 +0000
commit4aa54ba87234d07006f25ac325f04ee508b9026a (patch)
tree784662f542349b6464aac2a05e3d25870af4b1bc /src
parentd20b8af682d2e0413239d47ba2ecb30a41dec771 (diff)
(create_process): Don't abort if can't reopen
pty_name in the child. Exit the child instead.
Diffstat (limited to 'src')
-rw-r--r--src/process.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c
index 3d1ae0ee00..83de691d39 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1412,13 +1412,18 @@ create_process (process, new_argv, current_dir)
close (xforkin);
xforkout = xforkin = open (pty_name, O_RDWR, 0);
+ if (xforkin < 0)
+ {
+ write (1, "Couldn't open the pty terminal ", 31);
+ write (1, pty_name, strlen (pty_name));
+ write (1, "\n", 1);
+ _exit (1);
+ }
+
#ifdef SET_CHILD_PTY_PGRP
ioctl (xforkin, TIOCSPGRP, &pgrp);
ioctl (xforkout, TIOCSPGRP, &pgrp);
#endif
-
- if (xforkin < 0)
- abort ();
}
#endif /* not UNIPLUS and not RTU */
#ifdef SETUP_SLAVE_PTY