4 ms·
The FAQ says: > all while leaving no ptrace and sending no signal If this is a design goal, I'm afraid it is indeed impossible to take a snapshot of the origi
by Liskni_si 7y ago
The FAQ says:
> all while leaving no ptrace and sending no signal
If this is a design goal, I'm afraid it is indeed impossible to take a snapshot of the original process. As far as I know (I researched the status quo 2 years ago when I needed copy-on-write for VM cloning/forking), the only way to make a snapshot of a process' address space is to invoke the clone (fork) system call. If you need to take a snapshot of another process, then you need ptrace.
But you're absolutely right that the unfork functionality itself can be implemented more robustly by doing this ptrace/fork trick.