spawn problems

Hi All,

I’m trying to figure out how I can spawn a process on a remote thread
without it being
linked to the parent’s file system in code. Using the “on –d –f
nodename” I can start the
remote process and it works correctly. Using the following C code
spawns the process
but it terminates on errors.

struct inheritance spawn_params;
memset(&spawn_params, 0, sizeof(struct inheritance));

spawn_params.flags = SPAWN_SETND | SPAWN_NOZOMBIE;
spawn_params.nd = netmgr_strtond(“thisnode”, NULL);

ResultPID = spawn(NetFileAndPath, 0, NULL, &spawn_params, args, NULL);

The problem is that the remote application uses “pci_attach” to locate
and map to a PCI
device. When it is spawned, it scans the parents PCI server instead of
the remote
computers. Anyone know a workaround to this?


Also, I’ve noticed that my network shares using fs-cifs suddenly become
inaccessible
after a while of non-activity (hours or minutes, it depends).
Afterwards any process
trying to list their folders will block. Is fs-cifs known to be
unreliable or am I
experiencing something out of the ordinary? I’m connecting to a windows
2000 SP4
share, and other then the unexpected timeouts it works great.

Thanks,
Lee

The problem is that the remote application uses ?pci_attach? to locate
and map to a PCI
device. When it is spawned, it scans the parents PCI server instead of
the remote
computers. Anyone know a workaround to this?

The child (or the parent) has to chroot() to the remote node’s root path.

chroot("/net/machine/");


chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

That did the trick!

Thank you :slight_smile:


Lee

Chris McKillop <cdm@qnx.com> wrote in message
news:bumgkm$83s$1@inn.qnx.com

The problem is that the remote application uses ?pci_attach? to locate
and map to a PCI
device. When it is spawned, it scans the parents PCI server instead of
the remote
computers. Anyone know a workaround to this?


The child (or the parent) has to chroot() to the remote node’s root path.

chroot("/net/machine/");

Should have the parent do it, othereise, the child could endup loading .so
file
from the parent machine.

-xtang