Finding a process's name

OK. Under 4.25 I remember you could register a task’s name using qnx_name_attach() and later retrieve this name to determine if your task was running.

I want to do the same thing under Neutrino. But I can’t seem to find qnx_name_attach() in my .h files.

I know it’s possible because when I do a ‘sin’ I see tasks with names like pterm, jed, sin etc.

So, the 64K question is, how is it done under Neutrino. Then, how can one detemine from a shell script (our start script) if the task is already running (I want to make sure it doesn’t get run again while first instance is still running because the hardware doesn’t seem to like that :wink: )

One thing I really miss in Neutrino is a physical set of QNX manuals. With 4.25 I used to have a very nice set of books covering the O/S and another set for the Watcom compiler with all C/C++ functions listed. I assume this must be on the web someplace for Neutrino but I can never locate it and using the help under Photon doesn’t seem near as easy as a reference book.



Hmm… I am not sure you don’t have a couple concepts confused. Regardless, you can use name_attach() and name_open() to achieve similiar functionality to the qnx_name_* functions. From a shell script, you can always do a ‘pidin -P name’ and see if a process is running. Also in that helpviewer which you don’t like, there is a migration guide which shows the equivilent functions (if they exist) for the qnx4 functions you are familar with. It will help with future questions. :slight_smile:



Thanks. The pidin -P name approach piped to grep/cut worked just fine for my needs.

Actually it’s not that I hate the help viewer. It’s just that I can’t take it into the crapper to read or a host of other places that it’s handy to have a book. Plus as a fellow old, er experienced QNX user I am still handier with a book than online help in most cases :slight_smile:

Also, up until recently we were running 6.00 which had a very early version of the help viewer. I have recently upgraded to 6.2 and noticed that it’s gotten a lot better (like the migration guide for instance). However there are still annoying little things like no horizontal scroll bars in the left side index window so you have to make it real wide to see the entire text for some topics. But at least now all the C/C++ lib’s appear to be in there (something missing in 6.00) which is very nice.


The good news is there printed docs available with 6.3, so once again you will have reading material in the sitting room. :slight_smile: