Hi,
I’m currently working on an Autonomous Sailing Vessel project at the University of Adelaide. For the high level control tasks we are planning to implement a QNX Neutrino system.
My query today is the syntax required to get spawn(), and by extension it’s variations, to work?
I’ve tried a few things all to no avail.
todays attempt was:
char *args[] = { “sample”, NULL };
pid_t pid;
struct inheritance inherit;
inherit.flags = 0;
if ((pid = spawn("./././sample/x86/o/sample", 0, NULL, &inherit, args, environ)) == -1)
{
perror("spawn() failed");
}
else
{
printf("spawned child, pid = %d\n", pid);
}
Although I have previously tried spawnvp() command on a different machine, resulting in the same “spawn() failed: No such file or directory”.
I had thought that it might be project references that were the issue however todays attempt proved this guess to be wrong.
Any assistance would be greatly appreciated,
ncost