Robert Pluim writes: >>>>>> On Mon, 31 Jan 2022 22:48:33 +0200, Saulius Menkevicius said: > Try the following: > > diff --git a/src/callproc.c b/src/callproc.c > index 4d3b0bb8e0..2b4e8977a3 100644 > --- a/src/callproc.c > +++ b/src/callproc.c > @@ -1378,6 +1378,12 @@ emacs_posix_spawn_init_attributes (posix_spawnattr_t *attributes) > /* Stop blocking SIGCHLD in the child. */ > sigset_t oldset; ^^^ This is the root-cause of the issue: A new/invalid signal mask is introduced. The correct oldset mask from emacs_spawn(...,const sigset_t *oldset) is simply ignored. > error = pthread_sigmask (SIG_SETMASK, NULL, &oldset); > + if (error != 0) > + goto out; > + error = sigdelset (&oldset, SIGCHLD); > + if (error != 0) > + goto out; > + error = sigdelset (&oldset, SIGINT); > if (error != 0) > goto out; > error = posix_spawnattr_setsigmask (attributes, &oldset); IMO the correct way to fix this issue is to use the oldset passed by emacs_spawn (patch enclosed) just like the fork/exec implementation does. I guess without a fix many forking commands (that don't examine and change mask of blocked signals) will "hang" in Emacs. "dotnet" is just a prominent one. Jürgen