在Linux中使用C ++显示进程 [英] Show Process In Linux Using C++
本文介绍了在Linux中使用C ++显示进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始在C + +,阅读一本好书,我想构建一个程序,显示用户的所有的过程,他正在做的,使用C ++。
I am starting in C++, reading a good book of it and I want to build a program that shows the user all the process that the Linux of he is doing, using C++.
推荐答案
使用库
http://procps.sourceforge.net/
读取proc条目会很有用。这是 top
以及其他人如何访问正在运行的进程的列表。
For reading proc entries would be useful. This is how top
and others gain access to a list of running process.
也看到类似的问题: / p>
Also see a similar question:
您还可以链接到 libproc <比从procps复制源。
You can also link to the libproc library rather than copying source from procps.
这篇关于在Linux中使用C ++显示进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文