summaryrefslogtreecommitdiff
path: root/pkgtools/pbulk
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2013-04-14 17:03:30 +0000
committerdholland <dholland@pkgsrc.org>2013-04-14 17:03:30 +0000
commited06a609947e4f518f83c72a643ac67edd93cf53 (patch)
tree437168c8bc232c2c9ae39a3db91eafb1ec457c95 /pkgtools/pbulk
parent3b8bfebf7324da98c7dd9e116706499ce40e5a36 (diff)
downloadpkgsrc-ed06a609947e4f518f83c72a643ac67edd93cf53.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/pbulk')
-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);