I wonder how to clone a ucontext. Note: this is different from getcontext
and swapcontext
, because I would like to have a fork(2)
-like behaviour.
Thanks in advance.
I've tried double swapping to duplicate user context, but indeed the underlying stack is stayed unchanged and is problematic.