You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.8 KiB

diff -u -r ../ruby-2.3.0/process.c ./process.c
--- ../ruby-2.3.0/process.c 2015-12-23 03:57:48.000000000 -0500
+++ ./process.c 2015-12-25 15:40:56.370279634 -0500
@@ -1227,9 +1227,9 @@
10 years ago
*argv = (char *)prog;
*--argv = (char *)"sh";
if (envp)
- execve("/bin/sh", argv, envp); /* async-signal-safe */
+ execve("@TERMUX_PREFIX@/bin/sh", argv, envp); /* async-signal-safe */
10 years ago
else
- execv("/bin/sh", argv); /* async-signal-safe (since SUSv4) */
+ execv("@TERMUX_PREFIX@/bin/sh", argv); /* async-signal-safe (since SUSv4) */
10 years ago
}
#else
@@ -1301,9 +1301,9 @@
10 years ago
}
#else
if (envp_str)
- execle("/bin/sh", "sh", "-c", str, (char *)NULL, (char **)RSTRING_PTR(envp_str)); /* async-signal-safe */
+ execle("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, (char *)NULL, (char **)RSTRING_PTR(envp_str)); /* async-signal-safe */
10 years ago
else
- execl("/bin/sh", "sh", "-c", str, (char *)NULL); /* async-signal-safe (since SUSv4) */
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, (char *)NULL); /* async-signal-safe (since SUSv4) */
10 years ago
#endif
return -1;
#endif /* _WIN32 */
@@ -1406,7 +1406,7 @@
10 years ago
if (status == -1 && errno == ENOEXEC) {
*argv = (char *)prog;
*--argv = (char *)"sh";
- status = spawnv(P_NOWAIT, "/bin/sh", (const char **)argv);
+ status = spawnv(P_NOWAIT, "@TERMUX_PREFIX@/bin/sh", (const char **)argv);
10 years ago
after_exec();
if (status == -1) errno = ENOEXEC;
}
@@ -1444,7 +1444,7 @@
10 years ago
char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf));
before_exec();
- status = spawnl(P_NOWAIT, (shell ? shell : "/bin/sh"), "sh", "-c", str, (char*)NULL);
+ status = spawnl(P_NOWAIT, (shell ? shell : "@TERMUX_PREFIX@/bin/sh"), "sh", "-c", str, (char*)NULL);
10 years ago
after_exec();
return status;
}