+ 2
Ps function by c language
How can i make a function that do the work of the command ps on terminal???
6 odpowiedzi
+ 5
Nana4 Ever here is a reference which may be helpful if you are looking for processing status.
https://www.geeksforgeeks.org/getting-system-and-process-information-using-c-programming-and-shell-in-linux/
+ 1
You can execute the Linux command through a c program to get the details of the process using system function of stdlib header file.
https://www.techcrashcourse.com/2015/08/system-stdlib-c-library-function.html
https://www.techcrashcourse.com/2015/08/stdlib-h-c-standard-library-functions.html
0
You can read the source code of "ps" here: https://gitlab.com/procps-ng/procps/-/blob/newlib/ps/display.c