c - Linux Command to Show Stopped and Running processes? -
i'm presently executing following linux command in 1 of c programs display processes running. there anyway can modify show stopped processes , running ones?
char *const parmlist[] = {"ps","-o","pid,ppid,time","-g","-r",groupprocessid,null}; execvp("/bin/ps", parmlist);
ps -e
lists processes.
jobs
list processes stopped or in background.
so, can run jobs
command using execvp
:
char *arg = {"jobs", null}; execvp(arg[0], arg);
Comments
Post a Comment