aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/exec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/exec.cpp')
-rw-r--r--src/exec.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exec.cpp b/src/exec.cpp
index b55e7a26..79f461d1 100644
--- a/src/exec.cpp
+++ b/src/exec.cpp
@@ -145,13 +145,14 @@ char *get_interpreter(const char *command, char *interpreter, size_t buff_size)
interpreter[idx++] = '\0';
close(fd);
}
+
if (strncmp(interpreter, "#! /", 4) == 0) {
return interpreter + 3;
} else if (strncmp(interpreter, "#!/", 3) == 0) {
return interpreter + 2;
- } else {
- return NULL;
}
+
+ return NULL;
}
/// This function is executed by the child process created by a call to fork(). It should be called