关于Linux内核进程的遍历

时间:2013-07-22 07:33:04
【文件属性】:
文件名称:关于Linux内核进程的遍历
文件大小:24KB
文件格式:RAR
更新时间:2013-07-22 07:33:04
内核 进程 int init_module () { struct task_struct *task; struct list_head *q; list_for_each (q, &init_task.tasks) { task = list_entry (q, struct task_struct, tasks); printk ("<0>" "%d\t%d\t%s\n", task->pid, task->parent->pid, task->comm); } return 0; }
【文件预览】:
chrdev-02.zip
ps.zip

网友评论

  • 好资源,学习一下。
  • 最基础的遍历,初学linux进程遍历的话可以看一看。
  • 能实现基础的遍历。
  • 虽然东西不是很强,但是对于初学者还是很合适