Porting calls to qnx_spawn

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

Ping?

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

Josh Hamacher
FAAC Incorporated

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

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

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. :slight_smile:

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

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. > :slight_smile:

Josh

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


cburgess@qnx.com

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?

:sunglasses:

thanks,
sanjeev

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?

:sunglasses:

thanks,
sanjeev


cburgess@qnx.com

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?

:sunglasses:

thanks,
sanjeev