rem: if (act && act->sa_handler == SIG_IGN) thread->sig_pending &= ~SIGNAL_TO_MASK(signal); else if (act && act->sa_handler == SIG_DFL) { if (signal == SIGCONT || signal == SIGCHLD || signal == SIGWINCH) { thread->sig_pending &= ~SIGNAL_TO_MASK(signal); } }
add: if (act && act->sa_handler == SIG_IGN) {  atomic_and(&thread->sig_pending, ~SIGNAL_TO_MASK(signal)); } else if (act && act->sa_handler == SIG_DFL && (SIGNAL_TO_MASK(signal) & DEFAULT_IGNORE_SIGNALS) != NULL) {   atomic_and(&thread->sig_pending, ~SIGNAL_TO_MASK(signal)); }
context: sigaction_etc(thread_id threadID, int signal, const struct sigaction *act,	struct sigaction *oact){	struct thread *thread;	cpu_status state;	status_t error = B_OK;	if (signal < 1 || signal > MAX_SIGNO		|| signal == SIGKILL || signal == SIGKILLTHR || signal == SIGSTOP)		return EINVAL;	state = disable_interrupts();	GRAB_THREAD_LOCK();	thread = (threadID < 0		? thread_get_current_thread()		: thread_get_thread_struct_locked(threadID));	if (thread) {		if (oact) {			memcpy(oact, &thread->sig_action[signal - 1],				sizeof(struct sigaction));		}		if (act) {			memcpy(&thread->sig_action[signal - 1], act,				sizeof(struct sigaction));		}		if (act && act->sa_handler == SIG_IGN)			thread->sig_pending &= ~SIGNAL_TO_MASK(signal);		else if (act && act->sa_handler == SIG_DFL) {			if (signal == SIGCONT || signal == SIGCHLD				|| signal == SIGWINCH) {				thread->sig_pending &= ~SIGNAL_TO_MASK(signal);			}		} /*else			dprintf("### custom signal handler set\n");*/	} else		error = B_BAD_THREAD_ID;	RELEASE_THREAD_LOCK();	restore_interrupts(state);	return error;}