diff options
Diffstat (limited to 'package/toybox/patches')
-rw-r--r-- | package/toybox/patches/patch-main_c | 16 | ||||
-rw-r--r-- | package/toybox/patches/patch-toys_pending_init_c | 12 | ||||
-rw-r--r-- | package/toybox/patches/patch-toys_pending_sh_c | 29 |
3 files changed, 57 insertions, 0 deletions
diff --git a/package/toybox/patches/patch-main_c b/package/toybox/patches/patch-main_c new file mode 100644 index 000000000..e3e978763 --- /dev/null +++ b/package/toybox/patches/patch-main_c @@ -0,0 +1,16 @@ +--- toybox-0.8.12.orig/main.c 2025-01-18 21:20:33.000000000 +0100 ++++ toybox-0.8.12/main.c 2025-04-07 09:40:53.646935573 +0200 +@@ -179,13 +179,6 @@ void toy_singleinit(struct toy_list *whi + toys.old_umask = umask(0); + if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask); + +- // Try user's locale, but if that isn't UTF-8 merge in a UTF-8 locale's +- // character type data. (Fall back to en_US for MacOS.) +- setlocale(LC_CTYPE, ""); +- if (strcmp("UTF-8", nl_langinfo(CODESET))) +- uselocale(newlocale(LC_CTYPE_MASK, "C.UTF-8", 0) ? : +- newlocale(LC_CTYPE_MASK, "en_US.UTF-8", 0)); +- + if (which->flags & TOYFLAG_LINEBUF) btype = _IOLBF; + else if (which->flags & TOYFLAG_NOBUF) btype = _IONBF; + else buf = xmalloc(4096); diff --git a/package/toybox/patches/patch-toys_pending_init_c b/package/toybox/patches/patch-toys_pending_init_c new file mode 100644 index 000000000..3a69442ed --- /dev/null +++ b/package/toybox/patches/patch-toys_pending_init_c @@ -0,0 +1,12 @@ +--- toybox-0.8.12.orig/toys/pending/init.c 2025-01-18 21:20:33.000000000 +0100 ++++ toybox-0.8.12/toys/pending/init.c 2025-04-07 15:31:14.276281021 +0200 +@@ -246,8 +246,7 @@ static pid_t final_run(struct action_lis + + sigfillset(&signal_set); + sigprocmask(SIG_BLOCK, &signal_set, NULL); +- if (x->action & ASKFIRST) pid = fork(); +- else pid = vfork(); ++ pid = vfork(); + + if (pid > 0) { + //parent process or error diff --git a/package/toybox/patches/patch-toys_pending_sh_c b/package/toybox/patches/patch-toys_pending_sh_c new file mode 100644 index 000000000..37a7a3338 --- /dev/null +++ b/package/toybox/patches/patch-toys_pending_sh_c @@ -0,0 +1,29 @@ +--- toybox-0.8.12.orig/toys/pending/sh.c 2025-01-18 21:20:33.000000000 +0100 ++++ toybox-0.8.12/toys/pending/sh.c 2025-04-07 16:43:09.861935892 +0200 +@@ -1398,18 +1398,6 @@ static int run_subshell(char *str, int l + pid_t pid; + //dprintf(2, "%d run_subshell %.*s\n", getpid(), len, str); debug_show_fds(); + // The with-mmu path is significantly faster. +- if (CFG_TOYBOX_FORK) { +- if ((pid = fork())<0) perror_msg("fork"); +- else if (!pid) { +- call_function()->pp = (void *)1; +- if (str) { +- TT.ff->source = fmemopen(str, len, "r"); +- longjmp(TT.forkchild, 1); +- } +- } +- +- // On nommu vfork, exec /proc/self/exe, and pipe state data to ourselves. +- } else { + int pipes[2]; + unsigned i; + char **oldenv = environ, *ss = str ? : pl2str(TT.ff->pl->next, 0); +@@ -1446,7 +1434,6 @@ static int run_subshell(char *str, int l + dprintf(pipes[1], "0 0\n%.*s\n", len, ss); + if (!str) free(ss); + close(pipes[1]); +- } + + return pid; + } |