- }
- if(chdir(dname) < 0) {
- free(dname);
- continue;
- }
- free(dname);
- fuser_scan_link(opts, "cwd", pid, ilist, plist);
- fuser_scan_link(opts, "exe", pid, ilist, plist);
- fuser_scan_link(opts, "root", pid, ilist, plist);
- fuser_scan_dir_links(opts, "fd", pid, ilist, plist);
- fuser_scan_dir_links(opts, "lib", pid, ilist, plist);
- fuser_scan_dir_links(opts, "mmap", pid, ilist, plist);
- fuser_scan_pid_maps(opts, "maps", pid, ilist, plist);
- }
- closedir(d);
- return 1;
-}
-
-static int fuser_print_pid_list(pid_list *plist) {
- pid_list *curr;
- curr = plist;
-
- if(plist == NULL) return 0;
- while(curr != NULL) {
- if(curr->pid > 0) printf("%d ", curr->pid);
- curr = curr->next;
+ if (arg[1] == '-' && arg[2] == '\0') /* "--" */
+ break;
+ if ((arg[1] == '4' || arg[1] == '6') && arg[2] == '\0')
+ continue; /* it's "-4" or "-6" */
+ sig = get_signum(&arg[1]);
+ if (sig < 0)
+ continue;
+ /* "-SIGNAL" option found. Remove it and bail out */
+ G.killsig = sig;
+ do {
+ pp[0] = arg = pp[1];
+ pp++;
+ } while (arg);
+ break;