Follow-up Comment #1, bug #61621 (project make): After investigation is appears that the POSIX_SPAWN_RESETIDS flag is causing the problem. Applying this patch solved it for me:
diff --git a/src/job.c b/src/job.c index 54fadf00..9d97fc44 100644 --- a/src/job.c +++ b/src/job.c @@ -2359,8 +2359,8 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv) if ((r = posix_spawn_file_actions_adddup2 (&fa, fderr, FD_STDERR)) != 0) goto cleanup; - /* Be the user, permanently. */ - flags |= POSIX_SPAWN_RESETIDS; + /* We can't use the POSIX_SPAWN_RESETIDS flag: when make is invoked under + restrictive environments like unshare it will fail with EINVAL. */ /* Apply the spawn flags. */ if ((r = posix_spawnattr_setflags (&attr, flags)) != 0) I think this change should be OK, since it doesn't do any more or less than make would normally do when running a command. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?61621> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/