X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Frun-program.c;h=367dd77bc497042a89c8ae77a3adeb714a9da753;hb=c712f88b26cd7547ee984b90e18c134401335bc3;hp=00692b707ec6ff88e70cea3006f61f6016b65b83;hpb=d3ff5f451a5eb5730fb175e48b01235198aa7d58;p=sbcl.git diff --git a/src/runtime/run-program.c b/src/runtime/run-program.c index 00692b7..367dd77 100644 --- a/src/runtime/run-program.c +++ b/src/runtime/run-program.c @@ -25,7 +25,7 @@ #include #include #include - +#include #include #include #include @@ -193,7 +193,9 @@ int spawn(char *program, char *argv[], int sin, int sout, int serr, if (fd != channel[1]) close(fd); #endif - environ = envp; + if (envp) { + environ = envp; + } /* Exec the program. */ if (search) execvp(program, argv);