Porting calls to qnx_spawn

bridged with qdn.public.qnxrtp.porting
Post Reply
Sanjeev Koppal

Porting calls to qnx_spawn

Post by Sanjeev Koppal » Mon Aug 20, 2001 5:07 pm

Hi!
I was having some confusion when changing calls to qnx_spawn to the new
spawn* functions in QNX 6.1.
My two main concerns are:

1) Where do I get documentation about the struct inheritance? There is some
description of its fields in the spawn doc but it isnt complete...

2) In the qnx_spawn function of yore I could set the node descriptor and
the priority of the process that I was spawning...I havent figured out the
way to do that in the new scenario...

any help, advice or random comments will be valuable.

thanks,
sanjeev

Josh Hamacher

Re: Porting calls to qnx_spawn

Post by Josh Hamacher » Mon Aug 27, 2001 2:31 pm

Ping?

I'm also porting from QNX 4 and need to be able to spawn programs on a
remote node.

Josh Hamacher
FAAC Incorporated

Dean Douthat

Re: Porting calls to qnx_spawn

Post by Dean Douthat » Tue Sep 11, 2001 7:04 pm

We really need this functionality. Any comment from QSSL or should this
be in a different newgroup?

Josh Hamacher wrote:
Ping?

I'm also porting from QNX 4 and need to be able to spawn programs on a
remote node.

Josh Hamacher
FAAC Incorporated

Colin Burgess

Re: Porting calls to qnx_spawn

Post by Colin Burgess » Tue Sep 11, 2001 7:33 pm

Dean Douthat <ddouthat@faac.com> wrote:
We really need this functionality. Any comment from QSSL or should this
be in a different newgroup?
in the inheritance structure, set the SPAWN_SETND flag and put the node descriptor
in the .nd field.
Josh Hamacher wrote:

Ping?

I'm also porting from QNX 4 and need to be able to spawn programs on a
remote node.

Josh Hamacher
FAAC Incorporated
--
cburgess@qnx.com

Josh Hamacher

Re: Porting calls to qnx_spawn

Post by Josh Hamacher » Tue Sep 11, 2001 8:26 pm

Ah. Thanks a lot. Is that in the documentation anywhere? I couldn't
find it, and apparently Sanjeev (who started this thread) couldn't
either. It might not be needed often, but it's kinda important when it
is. :)

Josh


Colin Burgess wrote:
Dean Douthat <ddouthat@faac.com> wrote:

We really need this functionality. Any comment from QSSL or should this
be in a different newgroup?


in the inheritance structure, set the SPAWN_SETND flag and put the node descriptor
in the .nd field.


Josh Hamacher wrote:


Ping?

I'm also porting from QNX 4 and need to be able to spawn programs on a
remote node.

Josh Hamacher
FAAC Incorporated


Colin Burgess

Re: Porting calls to qnx_spawn

Post by Colin Burgess » Wed Sep 12, 2001 3:19 pm

Josh Hamacher <hamacher@faac.com> wrote:
Ah. Thanks a lot. Is that in the documentation anywhere? I couldn't
find it, and apparently Sanjeev (who started this thread) couldn't
either. It might not be needed often, but it's kinda important when it
is. :)

Josh
No, it appears to be omitted, probably because this only just
started working with 6.1.0 I believe.

--
cburgess@qnx.com

Sanjeev Koppal

and priority?

Post by Sanjeev Koppal » Mon Sep 17, 2001 8:17 pm

hi!
this gives a way to set nd, but what about priority? we could set this in
QNX4...is it now a member of inheritance?
and is there no documentation about inheritance, anywhere?
earth to QSSL?

8-)

thanks,
sanjeev

Colin Burgess

Re: and priority?

Post by Colin Burgess » Mon Sep 17, 2001 8:36 pm

From /usr/include/spawn.h

typedef struct inheritance {
unsigned long flags;
pid_t pgroup; /* SPAWN_SETGROUP must be set in flags */
sigset_t sigmask; /* SPAWN_SETSIGMASK must be set in flags */
sigset_t sigdefault; /* SPAWN_SETSIGDEF must be set in flags */
sigset_t sigignore; /* SPAWN_SETSIGIGN must be set in flags */
unsigned long stack_max; /* SPAWN_SETSTACKMAX must be set in flags */
#if __INT_BITS__ != 32
long policy; /* SPAWN_EXPLICIT_SCHED must be set in flags */
#else
int policy; /* SPAWN_EXPLICIT_SCHED must be set in flags */
#endif
_Uint32t nd; /* SPAWN_SETND must be set in flags */
_Uint32t reserved;
struct sched_param param; /* SPAWN_EXPLICIT_SCHED must be set in flags */
} spawn_inheritance_type;

the param member of the inheritance field can be used to set the priority.

Sanjeev Koppal <koppal@robotics.usc.edu> wrote:
hi!
this gives a way to set nd, but what about priority? we could set this in
QNX4...is it now a member of inheritance?
and is there no documentation about inheritance, anywhere?
earth to QSSL?

8-)

thanks,
sanjeev
--
cburgess@qnx.com

Sanjeev Koppal

Re: and priority?

Post by Sanjeev Koppal » Wed Sep 19, 2001 6:10 pm

thanks...


sanjeev









Colin Burgess wrote:
From /usr/include/spawn.h

typedef struct inheritance {
unsigned long flags;
pid_t pgroup; /* SPAWN_SETGROUP must be set
in flags */
sigset_t sigmask; /* SPAWN_SETSIGMASK must be
set in flags */
sigset_t sigdefault; /* SPAWN_SETSIGDEF must be set
in flags */
sigset_t sigignore; /* SPAWN_SETSIGIGN must be set
in flags */
unsigned long stack_max; /* SPAWN_SETSTACKMAX must be
set in flags */
#if __INT_BITS__ != 32
long policy; /* SPAWN_EXPLICIT_SCHED must
be set in flags */
#else
int policy; /* SPAWN_EXPLICIT_SCHED must
be set in flags */
#endif
_Uint32t nd; /* SPAWN_SETND must be set in
flags */
_Uint32t reserved;
struct sched_param param; /* SPAWN_EXPLICIT_SCHED must
be set in flags */
} spawn_inheritance_type;

the param member of the inheritance field can be used to set the priority.

Sanjeev Koppal <koppal@robotics.usc.edu> wrote:
hi!
this gives a way to set nd, but what about priority? we could set this in
QNX4...is it now a member of inheritance?
and is there no documentation about inheritance, anywhere?
earth to QSSL?

8-)

thanks,
sanjeev

Post Reply

Return to “qdn.public.qnxrtp.porting”