Ps function by c language | Sololearn: Learn to code for FREE!


Ps function by c language

How can i make a function that do the work of the command ps on terminal???


4/16/2021 6:36:55 PM

Nana4 Ever

3 Answers

New Answer


Nana4 Ever here is a reference which may be helpful if you are looking for processing status.


You can use system("ps") Or you can launch ps, your program acting as a shell with functions like this one: execvp(const char *file, char *const argv[]); see also: but the current process gets entirely replaced by the new executable process, so you need to fork processes if you want to keep running your main code.


PowerShell is the only programming / scripting language that I am very good at. I initially used the PowerShell in a Month of Lunches book to get me started and thought it was helpful due to the short to the point explanations and practical exercises at the end of each lesson. Does anyone know if a similar or better resource exists when trying to learn C#? I'm trying to expand my knowledge since I occasionally run into C# code at work and would like to have at least an advanced beginner level of knowledge working with it so that I can read the code, make changes, or create my own if I need to. For those of you who learned C# after PowerShell, how long did it take to feel comfortable with the language? Thanks for your help