summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-09-23 09:41:12 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-09-23 09:41:12 +0000
commit5e2a1c6aaa726f6749c8669bc00813d4ae7c6a64 (patch)
treea5edfd2bbec04ee7265e7ebd69342891934d0c99 /usr.bin
parent49d2284a1f93c7bde8e1f4707ee5181668877f91 (diff)
more specific error messages if dup2 fails
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/job.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 21f50fbfa98..85726b4c6bf 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: job.c,v 1.81 2007/09/23 09:39:18 espie Exp $ */
+/* $OpenBSD: job.c,v 1.82 2007/09/23 09:41:11 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -985,7 +985,7 @@ JobExec(Job *job, char **argv)
* input.
*/
if (dup2(fileno(job->cmdFILE), 0) == -1)
- Punt("Cannot dup2: %s", strerror(errno));
+ Punt("Cannot dup2(job->cmdFile): %s", strerror(errno));
(void)fcntl(0, F_SETFD, 0);
(void)lseek(0, 0, SEEK_SET);
@@ -994,7 +994,7 @@ JobExec(Job *job, char **argv)
* we've created for it.
*/
if (dup2(job->outPipe, 1) == -1)
- Punt("Cannot dup2: %s", strerror(errno));
+ Punt("Cannot dup2(job->outPipe): %s", strerror(errno));
/*
* The output channels are marked close on exec. This bit was
* duplicated by the dup2 (on some systems), so we have to
@@ -1003,7 +1003,7 @@ JobExec(Job *job, char **argv)
*/
(void)fcntl(1, F_SETFD, 0);
if (dup2(1, 2) == -1)
- Punt("Cannot dup2: %s", strerror(errno));
+ Punt("Cannot dup2(stdout): %s", strerror(errno));
#ifdef USE_PGRP
/*