Re: Looking at "int vforked" in signal handler is racy

Harald van Dijk <[email protected]> Sat, 9 Aug 2025 14:52:17 +0100
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
Hi,

On 09/08/2025 14:29, Denys Vlasenko wrote:
> struct job *vforkexec(union node *n, char **argv, const char *path, int 
> idx)
> {
>          struct job *jp;
>          int pid;
> 
>          jp = makejob(1);
> 
>          sigblockall(NULL);
>          vforked++;
> 
> <<<< Parent can get a signal here.
The sigblockall(NULL) is meant to prevent that from happening. Likewise 
for the next one you point out. Is sigblockall(NULL) insufficient for 
some reason?

Cheers,
Harald van Dijk