sin arg

Hi,

How can I obtain the ‘sin arg’ info from c programm?

Thank you

If the prog wants to get it’s own command line, look at _bgetcmd().
If it’s another prog, look at the docs for qnx_psinfo(), in particular
about magic_off and also sys/magic.h. If you are not familiar with
spatch, it is a QNX utility that can be used to read RAM as well
as disks. It might help for debugging.

Richard

Kalininas Andrius wrote:

Hi,

How can I obtain the ‘sin arg’ info from c programm?

Thank you

We have several things like this in our systems. The way we do a lot of
these functions is:

sin arg > filename

The output from the sin command is then stored in a text file that the C
program can parse.

Hope this helps,

Larry

Kalininas Andrius wrote:

Hi,

How can I obtain the ‘sin arg’ info from c programm?

Thank you

Look at qnx_ps_info().


Bill Caroselli – 1(626) 824-7983
Q-TPS Consulting
QTPS@EarthLink.net


“Kalininas Andrius” <andrius@peterlink.ru> wrote in message
news:a6v48s$o6s$1@inn.qnx.com

Hi,

How can I obtain the ‘sin arg’ info from c programm?

Thank you

“Bill Caroselli” <qtps@earthlink.net> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:a77ji4$o86$1@inn.qnx.com

Look at qnx_ps_info().


Bill Caroselli – 1(626) 824-7983
Q-TPS Consulting
QTPS@EarthLink.net


“Kalininas Andrius” <> andrius@peterlink.ru> > wrote in message
news:a6v48s$o6s$> 1@inn.qnx.com> …
Hi,

How can I obtain the ‘sin arg’ info from c programm?

Thank you

\

Thanks to all for answer.

I think that qnx_psinfo() is most perspective way to get other running
programms command line.

Well, magic_off, magic_sel fields from _psinfo gives the address of _magic
structure. And finally cmd field from struct _magic32 is “pointer to
command”.

That’s all is very nice. But __getmagicptr(void) gives only own magic
pointer. How I can access other running programs _magic structure? Which
functions to use: MK_FP(), mmap(), qnx_segment_get() ???


Andrius

Kalininas Andrius <andrius@peterlink.ru> wrote:


Thanks to all for answer.

I think that qnx_psinfo() is most perspective way to get other running
programms command line.

Well, magic_off, magic_sel fields from _psinfo gives the address of _magic
structure. And finally cmd field from struct _magic32 is “pointer to
command”.

That’s all is very nice. But __getmagicptr(void) gives only own magic
pointer. How I can access other running programs _magic structure? Which
functions to use: MK_FP(), mmap(), qnx_segment_get() ???

qnx_debug_xfer()

-David

Yes, I know it isn’t documented. Take a look in <sys/debug.h> for
the prototype.


QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

For those of you who are as stymied at guessing how the dummies are used
by staring at their types, get a copy of the sysmon source and
look at reg.c and register.c

Richard

David Gibbs wrote:

Kalininas Andrius <> andrius@peterlink.ru> > wrote:

Thanks to all for answer.

I think that qnx_psinfo() is most perspective way to get other running
programms command line.

Well, magic_off, magic_sel fields from _psinfo gives the address of _magic
structure. And finally cmd field from struct _magic32 is “pointer to
command”.

That’s all is very nice. But __getmagicptr(void) gives only own magic
pointer. How I can access other running programs _magic structure? Which
functions to use: MK_FP(), mmap(), qnx_segment_get() ???

qnx_debug_xfer()

-David

Yes, I know it isn’t documented. Take a look in <sys/debug.h> for
the prototype.


QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.