Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
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