S
sturlamolden
Here is a short question, forgive me if it shows plain ignorance of C:
- Can I setjmp in one thread and longjmp to the saved jmp_buf in
another?
If you wonder why I would like to do this evilness, the reason is that
Windows has no fork system call. So I wondered if fork could be faked
with non-local goto and threads, obviously with the limitation that no
new address space is created. To my knowledge, setjmp is the only
function apart from fork that returns twice.
Regards,
Sturla
- Can I setjmp in one thread and longjmp to the saved jmp_buf in
another?
If you wonder why I would like to do this evilness, the reason is that
Windows has no fork system call. So I wondered if fork could be faked
with non-local goto and threads, obviously with the limitation that no
new address space is created. To my knowledge, setjmp is the only
function apart from fork that returns twice.
Regards,
Sturla