Gervot Olivier(deleted)
02/12/2015 4:50 AM
post113304
|
Hi
I would like to get processes states (like pidin)
My Momentix version doesn't include sys/psinfo.h so i can't use the psinfo() function
I wrote some code :
sprintf( buffer, "/proc/%d/as", pid );
fd = open( buffer, O_RDONLY ) ;
procfs_status my_status;
memset(&my_status, 0x0, sizeof (my_status));
status = devctl( fd, DCMD_PROC_STATUS, &my_status, sizeof(my_status), NULL);
For any process my_status.state is 0 which mean STATE_DEAD
what is the problem ?
Thank
Olivier
|
|
|