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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -