RE: Change signal mask after vfork/clone system call

From: Gregory Giguashvili
Date: Thu Nov 04 2010 - 12:20:55 EST


> And is there a reason you can't mask the signals, vfork and unmask them
> again after the parent continues?
The signals are already masked in all threads and there's a dedicated thread, catching signals with sigwait. The problem is that vfork inherits signal mask to a child process and 3rd party executables are not processing any signals because they're not using sigwait technique.

Now, I could unmask signals for the thread calling vfork, but it seems not a signal-safe solution to me because signals may arrive to this thread until I reestablish the mask. pthread_atfork call comes to rescue to address such issues for fork, but there seems to be nothing for vfork call.

Giga
---------------------------------------------------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/