Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Get process state: (1 Item)
   
Get process state  
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