summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/init/init.c b/init/init.c
index 902c2fc5..9c845377 100644
--- a/init/init.c
+++ b/init/init.c
@@ -709,8 +709,10 @@ launch_single_user ()
Otherwise, open fd's 0, 1, and 2. */
if (term != MACH_PORT_NULL)
{
+ errno = 0;
fd = open (termname, O_RDWR);
- assert (fd != -1);
+ assert_perror (perror);
+
dup2 (fd, 0);
close (fd);
dup2 (0, 1);