Commit 51afd4ad authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

ltlcross: prefer execl("/bin/sh", ...) to execlp("sh", ...)

Fixes #98.

* bin/ Here.
parent 7524e051
......@@ -560,6 +560,12 @@ exec_command(const char* cmd)
// Try /bin/sh first, because it is faster to not do any PATH
// lookup.
static bool has_bin_sh = true;
if (has_bin_sh)
execl("/bin/sh", "sh", "-c", start, nullptr);
has_bin_sh = false;
execlp("sh", "sh", "-c", start, nullptr);
error(2, errno, "failed to run 'sh'");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment