summaryrefslogtreecommitdiff
path: root/bin/pkill
diff options
context:
space:
mode:
authorLawrence Stewart <lstewart@FreeBSD.org>2017-08-17 06:36:21 +0000
committerLawrence Stewart <lstewart@FreeBSD.org>2017-08-17 06:36:21 +0000
commit1e781c6f96614a362924113f91d28bd32dc60c7e (patch)
tree613481c2591a932fae39c2221d4ca7df99e961b0 /bin/pkill
parent35d87c7e96bf450a49b7845168f9a47cc9af1015 (diff)
downloadsrc-test-1e781c6f96614a362924113f91d28bd32dc60c7e.tar.gz
src-test-1e781c6f96614a362924113f91d28bd32dc60c7e.zip
The r322210 change to pgrep's PID delimiting behaviour causes pgrep's default
output to not include a trailing new line, which is a potential POLA violation for existing consumers. Change pgrep to always emit a trailing new line on completion of its output, regardless of the delimeter in use (which technically is also a potential POLA violation for existing consumers that rely on the pre-r322210 buggy behaviour, but a line has to be drawn somewhere). PR: 221534 Submitted by: kdrakehp zoho com Reported by: kdrakehp zoho com MFC after: 1 week X-MFC-with: r322210
Notes
Notes: svn path=/head/; revision=322613
Diffstat (limited to 'bin/pkill')
-rw-r--r--bin/pkill/pkill.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/pkill/pkill.c b/bin/pkill/pkill.c
index f65767a8f3866..380dc29e1f04a 100644
--- a/bin/pkill/pkill.c
+++ b/bin/pkill/pkill.c
@@ -568,6 +568,8 @@ main(int argc, char **argv)
continue;
rv |= (*action)(kp);
}
+ if (rv && pgrep)
+ putchar('\n');
if (!did_action && !pgrep && longfmt)
fprintf(stderr,
"No matching processes belonging to you were found\n");