diff: always properly kill pr(1)
When diff is invoked with -l it will spawn the pr(1) program. In some circumpstances the pr(1) was not properly killed when diff program exits. Submitted by: Bret Ketchum MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26232
This commit is contained in:
parent
5d9b05ac30
commit
fb0d1c6980
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365041
@ -412,10 +412,10 @@ diffreg(char *file1, char *file2, int flags, int capsicum)
|
|||||||
ixnew = xreallocarray(ixnew, len[1] + 2, sizeof(*ixnew));
|
ixnew = xreallocarray(ixnew, len[1] + 2, sizeof(*ixnew));
|
||||||
check(f1, f2, flags);
|
check(f1, f2, flags);
|
||||||
output(file1, f1, file2, f2, flags);
|
output(file1, f1, file2, f2, flags);
|
||||||
if (pr != NULL)
|
|
||||||
stop_pr(pr);
|
|
||||||
|
|
||||||
closem:
|
closem:
|
||||||
|
if (pr != NULL)
|
||||||
|
stop_pr(pr);
|
||||||
if (anychange) {
|
if (anychange) {
|
||||||
status |= 1;
|
status |= 1;
|
||||||
if (rval == D_SAME)
|
if (rval == D_SAME)
|
||||||
@ -1704,4 +1704,4 @@ print_space(int nc, int n, int flags) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff_output("%*s", col, "");
|
diff_output("%*s", col, "");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user