reset context before makecontext call, check

check return value of swapcontext
replace 1 with EXIT_FAILURE in all err calls
add in_isr sighndl safeguard
mitigate against signals when signals are off
mask all signals in signal handler