Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to find the name of a process in QNX? : (4 Items)
   
How to find the name of a process in QNX?  
Hi all,

 

Is there any way we can find the name of a process in QNX from the PID?
Or are there any APIs like getpid() for the process itself to know its name?

 

ProcessClass_t structure in the "sys/shutdown.h" header stores the process related information like PID and name.

While calling the shutdown_classify() callout during shutdown process, it provides the name of the process too: http://
www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.lib_ref/topic/s/shutdown_system.html#
shutdown_system__shutdown_classify

But this structure is used only by the OS and there isn't any documentation of it.
Re: How to find the name of a process in QNX?  
argv[0]

Sent from my BlackBerry - the most secure mobile device
From: community-noreply@qnx.com
Sent: August 2, 2018 17:22
To: ostech-core_os@community.qnx.com
Reply-to: ostech-core_os@community.qnx.com
Subject: How to find the name of a process in QNX?


Hi all,



Is there any way we can find the name of a process in QNX from the PID?
Or are there any APIs like getpid() for the process itself to know its name?



ProcessClass_t structure in the "sys/shutdown.h" header stores the process related information like PID and name.

While calling the shutdown_classify() callout during shutdown process, it provides the name of the process too: http://
www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.lib_ref/topic/s/shutdown_system.html#
shutdown_system__shutdown_classify

But this structure is used only by the OS and there isn't any documentation of it.



_______________________________________________

OSTech
http://community.qnx.com/sf/go/post119035
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Attachment: HTML sf-attachment-mime36902 3.31 KB
RE: How to find the name of a process in QNX?  
And if you need to know the name of a process other than yourself, you can read the file /proc/<pid>/exefile, where <pid
> is the PID you are interested in.

David
________________________________
From: Michael Schuster [community-noreply@qnx.com]
Sent: Thursday, August 02, 2018 11:37 AM
To: ostech-core_os
Subject: Re: How to find the name of a process in QNX?

argv[0]

Sent from my BlackBerry - the most secure mobile device
From: community-noreply@qnx.com
Sent: August 2, 2018 17:22
To: ostech-core_os@community.qnx.com
Reply-to: ostech-core_os@community.qnx.com
Subject: How to find the name of a process in QNX?


Hi all,



Is there any way we can find the name of a process in QNX from the PID?
Or are there any APIs like getpid() for the process itself to know its name?



ProcessClass_t structure in the "sys/shutdown.h" header stores the process related information like PID and name.

While calling the shutdown_classify() callout during shutdown process, it provides the name of the process too: http://
www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.lib_ref/topic/s/shutdown_system.html#
shutdown_system__shutdown_classify

But this structure is used only by the OS and there isn't any documentation of it.



_______________________________________________

OSTech
http://community.qnx.com/sf/go/post119035
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Attachment: HTML sf-attachment-mime36905 4.34 KB
Re: RE: How to find the name of a process in QNX?  
Thanks a lot! 

My use case was like a server and client model with IPC communication where application will use the library and server 
needs to know the name. Reading the file from /proc seems to be a great idea.