I'm trying to retrieve all the processes information(name, pid ,state, parent) with the following code:
struct task_struct *task = current; for_each_process(task){
I think you are clobbering up current.
Just :
struct task_struct *task; for_each_process(task){ ...
should be enough.
Now I would like to know whether there is any other (better) way of acheiving this task?!
You can get it from /proc.
--Swapnil
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/