summaryrefslogtreecommitdiffstats
path: root/usr.bin/pkill
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-03-20 11:47:44 +0000
committerpjd <pjd@FreeBSD.org>2005-03-20 11:47:44 +0000
commit1fbe41652e0c5f8551a51c98fa3b7be18774b9cc (patch)
treebe1ca0e0ec9223aa9afce86d36e99148ca56935b /usr.bin/pkill
parentc7d05e490c2ccbd4673cf2a4a583571e03d56d2f (diff)
downloadFreeBSD-src-1fbe41652e0c5f8551a51c98fa3b7be18774b9cc.zip
FreeBSD-src-1fbe41652e0c5f8551a51c98fa3b7be18774b9cc.tar.gz
Whitespace fixes.
Diffstat (limited to 'usr.bin/pkill')
-rw-r--r--usr.bin/pkill/pkill.12
-rw-r--r--usr.bin/pkill/pkill.c11
2 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/pkill/pkill.1 b/usr.bin/pkill/pkill.1
index f4180af..90d0027 100644
--- a/usr.bin/pkill/pkill.1
+++ b/usr.bin/pkill/pkill.1
@@ -146,7 +146,7 @@ print the process ID and the full argument list for each matching process.
This option can only be used with the
.Nm pgrep
command.
-.It Fl n
+.It Fl n
Select only the newest (most recently started) of the matching processes.
.It Fl o
Select only the oldest (least recently started) of the matching processes.
diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c
index 16ee385..68798f1 100644
--- a/usr.bin/pkill/pkill.c
+++ b/usr.bin/pkill/pkill.c
@@ -450,17 +450,16 @@ main(int argc, char **argv)
for (i = 0, kp = plist; i < nproc; i++, kp++) {
if (!selected[i])
continue;
-
if (bestidx == -1) {
/* The first entry of the list which matched. */
;
} else if (timercmp(&kp->ki_start, &best_tval, >)) {
/* This entry is newer than previous "best". */
- if (oldest) /* but we want the oldest */
+ if (oldest) /* but we want the oldest */
continue;
} else {
/* This entry is older than previous "best". */
- if (newest) /* but we want the newest */
+ if (newest) /* but we want the newest */
continue;
}
/* This entry is better than previous "best" entry. */
@@ -637,11 +636,11 @@ takepid(const char *pidfile)
char *endp, line[BUFSIZ];
FILE *fh;
long rval;
-
+
fh = fopen(pidfile, "r");
if (fh == NULL)
err(STATUS_ERROR, "can't open pid file `%s'", pidfile);
-
+
if (fgets(line, sizeof(line), fh) == NULL) {
if (feof(fh)) {
(void)fclose(fh);
@@ -651,7 +650,7 @@ takepid(const char *pidfile)
err(STATUS_ERROR, "can't read from pid file `%s'", pidfile);
}
(void)fclose(fh);
-
+
rval = strtol(line, &endp, 10);
if (*endp != '\0' && !isspace((unsigned char)*endp))
errx(STATUS_ERROR, "invalid pid in file `%s'", pidfile);
OpenPOWER on IntegriCloud