diff --git a/pkgs/spec-cpu/specinvoke-execve.patch b/pkgs/spec-cpu/specinvoke-execve.patch new file mode 100644 index 0000000..a237b8a --- /dev/null +++ b/pkgs/spec-cpu/specinvoke-execve.patch @@ -0,0 +1,15 @@ +--- a/unix.c 2024-10-08 12:30:18.785111397 +0200 ++++ b/unix.c 2024-10-08 12:32:09.580923368 +0200 +@@ -165,7 +165,11 @@ pid_t invoke(copy_info_t *ui, command_in + /* We could redirect them here. This might be useful for VMS? */ + *(si->command_ptr) = cmd; + si->invoke_args[0] = si->shell; +- execve(si->shell, si->invoke_args, env); ++ if (execve(si->shell, si->invoke_args, env) != 0) { ++ fprintf (stderr, "Can't execute command: %s(%d)\n", ++ STRERROR(errno), errno); ++ specinvoke_exit (1, si); ++ } + } else { /* Parent */ + ui->pid = pid; + fprintf (si->outfp, diff --git a/pkgs/spec-cpu/specinvoke.nix b/pkgs/spec-cpu/specinvoke.nix index 61be2d0..e61525a 100644 --- a/pkgs/spec-cpu/specinvoke.nix +++ b/pkgs/spec-cpu/specinvoke.nix @@ -20,6 +20,9 @@ in stdenv.mkDerivation { version = version; src = tar; sourceRoot = "tools/src/specinvoke/"; + patches = [ + ./specinvoke-execve.patch + ]; # Almost no bugs preInstall = '' mkdir -p $out/bin