On Sun, 2022-09-25 at 10:25 -0400, Dmitry Goncharov wrote: > However, the this does this reproduce on my sun.
Sorry Dmitry but I didn't understand that sentence...? The odd thing is that make ALREADY preserves the environment pointer and restores it, but it does so after child_execute_job() is called (after removing some ifdefs): { /* Fork the child process. */ char **parent_environ; run_local: block_sigs (); child->remote = 0; parent_environ = environ; jobserver_pre_child (flags & COMMANDS_RECURSE); child->pid = child_execute_job ((struct childbase *)child, child->good_stdin, argv); environ = parent_environ; /* Restore value child may have clobbered. */ jobserver_post_child (flags & COMMANDS_RECURSE); } I suppose this may not be sufficient to fix the problem?