added signal mask to en/disable interrupts