summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/exec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/exec.c b/src/exec.c
index bbb70e8..42299ea 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -149,6 +149,8 @@ shellexec(char **argv, const char *path, int idx)
 STATIC void
 tryexec(char *cmd, char **argv, char **envp)
 {
+	char *const path_bshell = _PATH_BSHELL;
+
 repeat:
 #ifdef SYSV
 	do {
@@ -157,9 +159,9 @@ repeat:
 #else
 	execve(cmd, argv, envp);
 #endif
-	if (cmd != _PATH_BSHELL && errno == ENOEXEC) {
+	if (cmd != path_bshell && errno == ENOEXEC) {
 		*argv-- = cmd;
-		*argv = cmd = _PATH_BSHELL;
+		*argv = cmd = path_bshell;
 		goto repeat;
 	}
 }