- pidList = find_pid_by_name( argv[optind]);
- if (!pidList || *pidList<=0) {
- break;
- }
-
- for(; pidList && *pidList!=0; pidList++) {
- printf("%ld ", (long)*pidList);
+ pidList = find_pid_by_name(argv[optind]);
+ for(pl = pidList; *pl > 0; pl++) {
+ printf("%s%ld", (n++ ? " " : ""), *pl);
+ fail = 0;
+ if (single_flag)
+ break;