Kevin Stallard(deleted)
|
Re: Enumerating pathname space entries
|
Kevin Stallard(deleted)
04/17/2010 9:26 PM
post51994
|
Re: Enumerating pathname space entries
Ok
I have this figured out.
I tried chroot() the parent before spawning the child. It worked for the child, but the parent then had a new chroot()
it couldn't get rid of...kind of like what happens when you get a stepmother, if you don't like her, you can't get rid
of her...
I tired chooting the parent through the child node back to the parent node, but apparently chroot() is too smart for
that as well.
Then came the problem of the current working directory. it would build a path that was a mile long and it wasn't even
correct! If I was spawning from node1 to node2, and had node3 running on the network, I'd end up with a current working
directory along the lines of:
/net/node1.domain.com/net/node3.domain.com/net/node3.domain.com/net/node3.domain.com.
Node2 wasn't even mentioned, even though that's where the process ended up.
We need to sit down and have a talk about this chroot and cwd business :)
So, as I mentioned, I fixed the problem. I hope this isn't too much of a no-no, and I know someone is going to kick me
for it, but I created my own spawn function that allows you to specify what the root directory will be for the process
you are spawning.
There are cases where it needs to be a directory of the destination node w/o having to cripple the process that spawns
it.
If anyone knows of a better way, I'm all ears...
Thanks
Kevin
|
|
|