K
Kevin
Hello,
I have a main processes that opens a number of file handles, keeps
track of the opened handles, then forks and execs different programs
that utilize them (usually i dup to stdin). Often I launch more than
one instance of a given program, and that instance will use the same
handle as its co process.
However if the main process keeping track of all these handles has to
restart, I lose all the open file handles. File descriptor numbers
are meaningless on a restart, so I don't think say data dumper is
going to do me any good.
In C, it's possible to pass this information to another process with
I_SENDFD and I_RECVFD ioctls on a STREAMS pipe. So that other process
could hold onto the data, and hand it back to the main process on
restart.
However that's a hassle, and would involve some XS/Inline code.
Is there some way to save/write out the true handle reference, so that
it could be reloaded on startup?
Thanks!
I have a main processes that opens a number of file handles, keeps
track of the opened handles, then forks and execs different programs
that utilize them (usually i dup to stdin). Often I launch more than
one instance of a given program, and that instance will use the same
handle as its co process.
However if the main process keeping track of all these handles has to
restart, I lose all the open file handles. File descriptor numbers
are meaningless on a restart, so I don't think say data dumper is
going to do me any good.
In C, it's possible to pass this information to another process with
I_SENDFD and I_RECVFD ioctls on a STREAMS pipe. So that other process
could hold onto the data, and hand it back to the main process on
restart.
However that's a hassle, and would involve some XS/Inline code.
Is there some way to save/write out the true handle reference, so that
it could be reloaded on startup?
Thanks!