summaryrefslogtreecommitdiff
path: root/usr.bin/diff/diffdir.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-25 03:37:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-25 03:37:33 +0000
commitc40b6440ed441f569bb89ee27c1695ac0432547b (patch)
tree4a3ad7d7e667635005df68d686a1178db69df35c /usr.bin/diff/diffdir.c
parent8a09840496aac00b47ef80432ea41fc452208dbf (diff)
exit path signal race safe
Diffstat (limited to 'usr.bin/diff/diffdir.c')
-rw-r--r--usr.bin/diff/diffdir.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/diff/diffdir.c b/usr.bin/diff/diffdir.c
index 4e0b8da1e75..6e81615bf92 100644
--- a/usr.bin/diff/diffdir.c
+++ b/usr.bin/diff/diffdir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diffdir.c,v 1.6 2003/06/25 03:32:11 deraadt Exp $ */
+/* $OpenBSD: diffdir.c,v 1.7 2003/06/25 03:37:32 deraadt Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -92,7 +92,7 @@ diffdir(char **argv)
if (opt == D_IFDEF) {
fprintf(stderr, "diff: can't specify -I with directories\n");
- done();
+ done(0);
}
if (opt == D_EDIT && (sflag || lflag))
fprintf(stderr,
@@ -232,7 +232,7 @@ setupdir(char *cp)
if (dirp == NULL) {
fprintf(stderr, "diff: ");
perror(cp);
- done();
+ done(0);
}
nitems = 0;
dp = talloc(sizeof(struct dir));
@@ -367,7 +367,7 @@ calldiff(char *wantpr)
pid = fork();
if (pid == -1) {
fprintf(stderr, "No more processes");
- done();
+ done(0);
}
if (pid == 0) {
close(0);
@@ -377,13 +377,13 @@ calldiff(char *wantpr)
execv(pr + 4, prargs);
execv(pr, prargs);
perror(pr);
- done();
+ done(0);
}
}
pid = fork();
if (pid == -1) {
fprintf(stderr, "diff: No more processes\n");
- done();
+ done(0);
}
if (pid == 0) {
if (wantpr) {
@@ -395,7 +395,7 @@ calldiff(char *wantpr)
execv(diff + 4, diffargv);
execv(diff, diffargv);
perror(diff);
- done();
+ done(0);
}
if (wantpr) {
close(pv[0]);
@@ -407,7 +407,7 @@ calldiff(char *wantpr)
continue;
/*
if ((lstatus >> 8) >= 2)
- done();
+ done(0);
*/
dirstatus |= lstatus >> 8;
}