From c2ee1dcc02035d781d6c70f06df7106979a9f870 Mon Sep 17 00:00:00 2001 From: obrien Date: Sat, 9 Dec 2000 09:35:55 +0000 Subject: Add `_PATH_DEVZERO'. Use _PATH_* where where possible. --- bin/sh/jobs.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index e437441..8ba307b 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -52,6 +52,7 @@ static const char rcsid[] = #include #include #include +#include #endif #include @@ -635,9 +636,9 @@ forkshell(jp, n, mode) if ((jp == NULL || jp->nprocs == 0) && ! fd0_redirected_p ()) { close(0); - if (open("/dev/null", O_RDONLY) != 0) - error("Can't open /dev/null: %s", - strerror(errno)); + if (open(_PATH_DEVNULL, O_RDONLY) != 0) + error("Can't open %s: %s", + _PATH_DEVNULL, strerror(errno)); } } #else @@ -647,9 +648,9 @@ forkshell(jp, n, mode) if ((jp == NULL || jp->nprocs == 0) && ! fd0_redirected_p ()) { close(0); - if (open("/dev/null", O_RDONLY) != 0) - error("Can't open /dev/null: %s", - strerror(errno)); + if (open(_PATH_DEVNULL, O_RDONLY) != 0) + error("Can't open %s: %s", + _PATH_DEVNULL, strerror(errno)); } } #endif -- cgit v1.1