summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/misc.c b/misc.c
index 755eda10..143dbf0e 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.70 2009/01/22 10:02:34 djm Exp $ */
+/* $OpenBSD: misc.c,v 1.71 2009/02/21 19:32:04 tobias Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -714,7 +714,8 @@ sanitise_stdfd(void)
int nullfd, dupfd;
if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
- fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno));
+ fprintf(stderr, "Couldn't open /dev/null: %s\n",
+ strerror(errno));
exit(1);
}
while (++dupfd <= 2) {
@@ -722,7 +723,7 @@ sanitise_stdfd(void)
if (fcntl(dupfd, F_GETFL, 0) >= 0)
continue;
if (dup2(nullfd, dupfd) == -1) {
- fprintf(stderr, "dup2: %s", strerror(errno));
+ fprintf(stderr, "dup2: %s\n", strerror(errno));
exit(1);
}
}