last_patch_67 from Vladimir N. Oleynik

This commit is contained in:
Glenn L McGrath
2002-11-25 22:12:28 +00:00
parent 5b110874df
commit bb2e9d47f3
2 changed files with 14 additions and 11 deletions

View File

@@ -52,11 +52,12 @@ extern int pidof_main(int argc, char **argv)
/* Looks like everything is set to go. */
while(optind < argc) {
long* pidList;
long *pidList;
long *pl;
pidList = find_pid_by_name(argv[optind]);
for(; *pidList > 0; pidList++) {
printf("%s%ld", (n++ ? " " : ""), (long)*pidList);
for(pl = pidList; *pl > 0; pl++) {
printf("%s%ld", (n++ ? " " : ""), *pl);
fail = 0;
if (single_flag)
break;