summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authordholland <dholland>2013-04-14 17:03:30 +0000
committerdholland <dholland>2013-04-14 17:03:30 +0000
commit73afae7c0cf7ddd62c8847e3dcfe92601cf97b9f (patch)
tree437168c8bc232c2c9ae39a3db91eafb1ec457c95 /pkgtools
parentd4c40e289d4e98b310af4441787d56dd22a1669a (diff)
downloadpkgsrc-73afae7c0cf7ddd62c8847e3dcfe92601cf97b9f.tar.gz
Minor tidyup to error reporting. (This has been sitting in one of my trees
for a year and a half and I don't remember the context.) ok'd by joerg
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pbulk/files/pbulk/lib/read_child.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgtools/pbulk/files/pbulk/lib/read_child.c b/pkgtools/pbulk/files/pbulk/lib/read_child.c
index abaac0d83cb..ce3e7b72595 100644
--- a/pkgtools/pbulk/files/pbulk/lib/read_child.c
+++ b/pkgtools/pbulk/files/pbulk/lib/read_child.c
@@ -1,4 +1,4 @@
-/* $NetBSD: read_child.c,v 1.3 2011/09/24 12:58:55 joerg Exp $ */
+/* $NetBSD: read_child.c,v 1.4 2013/04/14 17:03:30 dholland Exp $ */
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -65,10 +65,11 @@ read_from_child(const char *dir, const char *cmd, const char * const *argv)
buf = xrealloc(buf, buf_len + 1);
}
if (bytes_read == -1) {
+ warn("read failed");
(void)close(fd);
(void)kill(child, SIGTERM);
(void)waitpid(child, &status, 0);
- err(1, "read failed");
+ exit(1);
}
(void)close(fd);