process name vs. file name

I noticed that in SP2 (I noticed it now, but maybe it started earlier) the
note section in ELF files keeps the name this file was built with. I.e.
if a file was built with -o /home/foo/bar/x86/o/bar option, this string
will be placed to .note. In earlier versions that section was filled with
01.01 pattern.

Using the .note section to keep that information is not a problem by
itself. What puzzles me is why this string is used by procnto to identify
a process, and can I turn this feature off?

Let’s say I installed the file to a target and run it there.

cp -vfpc /home/foo/bar/x86/o/bar /bin/foo

Instead of seeing foo or /bin/foo among the running processes I see that
process by it birth name:/home/foo/bar/x86/o/bar. When I want to send a
signal to a process that I launched as /bin/foo I use slay -s SIGINT bar.

Can I tell procnto to use the path a process was launched with?

Serge,

So far I’ve seen this occur on binaries where a use message was added
with the usemsg utility. Do you run usemsg on the binary? And is this
a QNX C project built with the IDE, or just a standard make project?


Ryan J. Allen
ryallen@qnx.com


Serge Yuschenko wrote:

I noticed that in SP2 (I noticed it now, but maybe it started earlier) the
note section in ELF files keeps the name this file was built with. I.e.
if a file was built with -o /home/foo/bar/x86/o/bar option, this string
will be placed to .note. In earlier versions that section was filled with
01.01 pattern.

Using the .note section to keep that information is not a problem by
itself. What puzzles me is why this string is used by procnto to identify
a process, and can I turn this feature off?

Let’s say I installed the file to a target and run it there.

cp -vfpc /home/foo/bar/x86/o/bar /bin/foo

Instead of seeing foo or /bin/foo among the running processes I see that
process by it birth name:/home/foo/bar/x86/o/bar. When I want to send a
signal to a process that I launched as /bin/foo I use slay -s SIGINT bar.

Can I tell procnto to use the path a process was launched with?

Hi Ryan,

Yes, I do use the usemsg, and also ldrel to place my own QNX_info
section. As soon as I disable them the .note section is filled with
01.01. I can even delete the this section after I call usemsg and
ldrel. Actually, it is fine with me if any information is plased
there. What wonders me is why that data is taken as a process name.

This is the make project (with qconfig.mk, qtargets.mk, and etc.) on
self-hosted Neutrino (6.3.0 SP2) platform.

Sincerely,

Serge