RFR(s): 8223777: In posix_spawn mode, failing to exec() jspawnhelper does not result in an error

Florian Weimer fweimer at redhat.com
Tue May 14 08:22:22 UTC 2019

* Thomas Stüfe:

> This is impossible to fix completely - see Martin's comment about the
> impossibility to foresee whether an exec() will succeed without actually
> exec()ing. But at least we can test the execute permissions on the
> jspawnhelper. Which this fix does. This fixes Ubuntu 16.4 (Now, I get an
> IOException if jspawnhelper is not executable).

I think jspawnhelper could write something to the pipe to show that it
has started.  If you never get that notification, you know that
jspawnhelper hasn't run, even if posix_spawn has succeeded.

(This fix will also help qemu-user and WSL, which implement vfork as
fork and interfere with the internal error reporting from posix_spawn.)


More information about the core-libs-dev mailing list