ps --ppid

This commit is contained in:
albert
2003-02-09 07:31:11 +00:00
parent b8e27a1ecf
commit f5702f2c75
7 changed files with 16 additions and 1 deletions

View File

@ -753,6 +753,7 @@ static const char *parse_gnu_option(void){
{"noheading", &&case_noheading},
{"noheadings", &&case_noheadings},
{"pid", &&case_pid},
{"ppid", &&case_ppid},
{"rows", &&case_rows},
{"secsid", &&case_secsid},
{"sid", &&case_sid},
@ -881,6 +882,14 @@ static const char *parse_gnu_option(void){
if(err) return err;
selection_list->typecode = SEL_PID;
return NULL;
case_ppid:
trace("--ppid\n");
arg = grab_gnu_arg();
if(!arg) return "List of process IDs must follow --ppid.";
err=parse_list(arg, parse_pid);
if(err) return err;
selection_list->typecode = SEL_PPID;
return NULL;
case_rows:
case_lines:
trace("--rows\n");