Re: fork/clone external to a process?
From: Dan Sturtevant
Date: Wed Dec 22 2004 - 08:51:50 EST
On Wed, 22 Dec 2004 09:56:15 +0100, Pjotr Kourzanov
> What exactly are you referring to by "checkpoint" and "revert"? Do
> you mean temporarily stop and then resume?
Checkpoint is a terrible name for what I want to do to the process.
The only thing I mean is that I want one of the "forked" processes
either wait() ing for the other one to end or SIGSTOPed so I can wake
it up when the other ends. The sleeping one will be in the state that
the other was in at the time of the fork.
> Well, the kernel AFAIK makes deep copies of task structs only on
> behalf of a process (would be a security hole otherwise). I suppose you
> could change that, but I am afraid there will be a lot of resistance to
> it on LKML...
I would never suggest anyone else do this to a kernel they care deeply about.
> > My problem is that I want this to happen on demand rather than
> > whenever the substituted shared library call is invoked inside the
> > executable.
> Do you really need /that/ flexibility? Just strace vmware and see
> what calls it does and when. Then just pick one that's in libc.so or
> another shared library. Don't forget to pass the call down to the
> original function;-)
I guess LD_PRELOAD could work. It would be especially nice if I could
get inside a signal handler.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/