diff options
-rw-r--r-- | procps/pidof.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/procps/pidof.c b/procps/pidof.c index 941582704..c75571a01 100644 --- a/procps/pidof.c +++ b/procps/pidof.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * pidof implementation for busybox | 3 | * pidof implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen | 5 | * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen |
6 | * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | 6 | * Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | extern int pidof_main(int argc, char **argv) | 36 | extern int pidof_main(int argc, char **argv) |
37 | { | 37 | { |
38 | int opt; | 38 | int opt, n = 0; |
39 | 39 | ||
40 | 40 | ||
41 | /* do normal option parsing */ | 41 | /* do normal option parsing */ |
@@ -66,7 +66,7 @@ extern int pidof_main(int argc, char **argv) | |||
66 | } | 66 | } |
67 | 67 | ||
68 | for(; pidList && *pidList!=0; pidList++) { | 68 | for(; pidList && *pidList!=0; pidList++) { |
69 | printf("%ld ", (long)*pidList); | 69 | printf("%s%ld", (n++ ? " " : ""), (long)*pidList); |
70 | } | 70 | } |
71 | /* Note that we don't bother to free the memory | 71 | /* Note that we don't bother to free the memory |
72 | * allocated in find_pid_by_name(). It will be freed | 72 | * allocated in find_pid_by_name(). It will be freed |