2019-02-24 19:00:08 +01:00
|
|
|
diff -u -r ../ruby-2.6.1/process.c ./process.c
|
|
|
|
--- ../ruby-2.6.1/process.c 2018-12-22 10:23:06.000000000 +0000
|
|
|
|
+++ ./process.c 2019-02-16 09:27:04.713434722 +0000
|
|
|
|
@@ -1569,9 +1569,9 @@
|
2015-06-13 01:03:31 +02:00
|
|
|
*argv = (char *)prog;
|
|
|
|
*--argv = (char *)"sh";
|
|
|
|
if (envp)
|
|
|
|
- execve("/bin/sh", argv, envp); /* async-signal-safe */
|
2015-12-02 11:54:07 +01:00
|
|
|
+ execve("@TERMUX_PREFIX@/bin/sh", argv, envp); /* async-signal-safe */
|
2015-06-13 01:03:31 +02:00
|
|
|
else
|
2015-12-25 22:35:13 +01:00
|
|
|
- execv("/bin/sh", argv); /* async-signal-safe (since SUSv4) */
|
|
|
|
+ execv("@TERMUX_PREFIX@/bin/sh", argv); /* async-signal-safe (since SUSv4) */
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
2019-02-24 19:00:08 +01:00
|
|
|
@@ -1639,9 +1639,9 @@
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
if (envp_str)
|
2019-02-24 19:00:08 +01:00
|
|
|
- execle("/bin/sh", "sh", "-c", str, (char *)NULL, RB_IMEMO_TMPBUF_PTR(envp_str)); /* async-signal-safe */
|
|
|
|
+ execle("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, (char *)NULL, RB_IMEMO_TMPBUF_PTR(envp_str)); /* async-signal-safe */
|
2015-06-13 01:03:31 +02:00
|
|
|
else
|
2015-12-25 22:35:13 +01:00
|
|
|
- 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) */
|
2015-06-13 01:03:31 +02:00
|
|
|
#endif /* _WIN32 */
|
2018-04-22 21:24:15 +02:00
|
|
|
return errno;
|
|
|
|
}
|
2019-02-24 19:00:08 +01:00
|
|
|
@@ -1744,7 +1744,7 @@
|
2015-06-13 01:03:31 +02:00
|
|
|
if (status == -1 && errno == ENOEXEC) {
|
|
|
|
*argv = (char *)prog;
|
|
|
|
*--argv = (char *)"sh";
|
|
|
|
- status = spawnv(P_NOWAIT, "/bin/sh", (const char **)argv);
|
2015-12-02 11:54:07 +01:00
|
|
|
+ status = spawnv(P_NOWAIT, "@TERMUX_PREFIX@/bin/sh", (const char **)argv);
|
2015-06-13 01:03:31 +02:00
|
|
|
after_exec();
|
|
|
|
if (status == -1) errno = ENOEXEC;
|
|
|
|
}
|
2019-02-24 19:00:08 +01:00
|
|
|
@@ -1782,7 +1782,7 @@
|
2015-06-13 01:03:31 +02:00
|
|
|
|
|
|
|
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);
|
2015-12-02 11:54:07 +01:00
|
|
|
+ status = spawnl(P_NOWAIT, (shell ? shell : "@TERMUX_PREFIX@/bin/sh"), "sh", "-c", str, (char*)NULL);
|
2015-06-13 01:03:31 +02:00
|
|
|
after_exec();
|
|
|
|
return status;
|
|
|
|
}
|