Prev Next | OpenBSD and Rthreads | Slide #14 |
Previously, threads were created using a function:
rfork_thread(int flags, void *stack_ptr, void (*func)(void *), void *arg)called rfork(flags)
change stack register to stack_ptr
invoke func(arg)
what happens if the new thread receives a signal between (1) and (2)?
new thread uses the parent thread's stack while processesing the signal!
"Boom"
EuroBSDCon 2012 | Copyright © 2012 Philip Guenther |