P
P
Pinkman2020-10-20 21:07:19
linux
Pinkman, 2020-10-20 21:07:19

How to view processes from a C/C++ program?

Good evening everyone! You need to make a simple program (daemon) that will turn off minecraft (and not let you turn it back on) after the limit per day has expired. There was a difficulty that I do not know how to view processes in linux'e. this is the only way I know of. What are the alternatives to the above method?
system("ps -a >> file.txt")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pinkman, 2020-10-20
@famousman204

In short, the answer is this. All data from the system kernel is in the magic folder / proc /
who are interested in reading

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question