projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support building without PSEUDO-ATOMIC on POSIX safepoints
[sbcl.git]
/
src
/
runtime
/
run-program.c
diff --git
a/src/runtime/run-program.c
b/src/runtime/run-program.c
index
00692b7
..
ef9c51c
100644
(file)
--- a/
src/runtime/run-program.c
+++ b/
src/runtime/run-program.c
@@
-25,7
+25,7
@@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
-
+#include <sys/wait.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <errno.h>
@@
-193,7
+193,9
@@
int spawn(char *program, char *argv[], int sin, int sout, int serr,
if (fd != channel[1]) close(fd);
#endif
if (fd != channel[1]) close(fd);
#endif
- environ = envp;
+ if (envp) {
+ environ = envp;
+ }
/* Exec the program. */
if (search)
execvp(program, argv);
/* Exec the program. */
if (search)
execvp(program, argv);
@@
-291,9
+293,9
@@
HANDLE spawn (
/* Spawn process given on the command line*/
if (search)
/* Spawn process given on the command line*/
if (search)
- hProcess = (HANDLE) spawnvp ( wait_mode, program, argv );
+ hProcess = (HANDLE) spawnvp ( wait_mode, program, (char* const* )argv );
else
else
- hProcess = (HANDLE) spawnv ( wait_mode, program, argv );
+ hProcess = (HANDLE) spawnv ( wait_mode, program, (char* const* )argv );
/* Now that the process is launched, replace the original
* in/out/err handles and close the backups. */
/* Now that the process is launched, replace the original
* in/out/err handles and close the backups. */