Fix issue #8 on github about shell absolute path in spawn function, thanks to antoineB
This commit is contained in:
parent
1585802bf0
commit
7e05c2dadf
@ -105,7 +105,7 @@ spawn(const char *format, ...)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!(sh = getenv("SHELL")))
|
||||
if(!(sh = getenv("SHELL")) || sh[0] != '/')
|
||||
sh = "/bin/sh";
|
||||
|
||||
if((pid = fork()) == 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user