Rob <rob@spamyouself.com> wrote:
Thanks David, but that would be a “or there might, still, be something more”
I’ve tried with and without _SPAWN_NOZOMBIE. Same results, errno=11.
Oh well.
I guess the next question is, why do you need to do this, and how
desperately.
/* spawn_server.c */
…
while(1) {
Receive(0, msg, sizeof(msg) );
spawn(msg.executable);
}
/* spawnlib.c */
int myspawn(executable)
{
find_remote_pid();
msg.executable = executable;
Send(remote_pid, &msg, NULL, sizeof(msg), 0 );
}
I THINK you should be able to do a qnx_name_attach() on the
protected node, and a qnx_name_locate( protect_nid, name, … )
to find it – though I haven’t directly tested.
Of course, this does depend on having spawn_server running all
the time, and given that, really, Proc32 is a spawn_server, and
is already running all the time, this really shouldn’t be neccessary.
(Though, apparently, there are more side-effects to get proper “spawn”
behaviour that require something.)
FYI… doing things like leaving fds open and/or not referencing a path on
the localized node’s file system for the executable being spawned, gives an
errno of 1011 (No License).
Yes, that makes sense – I looked at those kernel paths a few (well, many)
moons ago when I was implementing the -L2 option, it generates an
ENOLIC whenever it fails a vc create due to the no inbound or no
outbound options.
-David
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.