summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-06-01 08:43:17 +0100
committerRon Yorston <rmy@pobox.com>2020-06-01 08:43:17 +0100
commit3c5995713d91df7b6f803b34e43df188646b0676 (patch)
tree8e00d001cb509aa1f448cebdfb5d12eb9d743c18 /shell/ash.c
parentf81fcc84134ab2f29816dbfaf2e5af9ee62d2691 (diff)
downloadbusybox-w32-3c5995713d91df7b6f803b34e43df188646b0676.tar.gz
busybox-w32-3c5995713d91df7b6f803b34e43df188646b0676.tar.bz2
busybox-w32-3c5995713d91df7b6f803b34e43df188646b0676.zip
ash: simplify spawning during forkshell
spawn_forkshell() uses mingw_spawn_proc() to start the child shell. mingw_spawn_proc() then calls mingw_spawn_1() which determines that "sh" is an applet, thus calling mingw_spawn_applet() which finally calls spawnveq(). Not only is this convoluted it also won't work if PREFER_APPLETS and SH_STANDALONE aren't enabled. Simplify matters by adding a new function, mingw_spawn_forkshell(), which is tailored for just this case.
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 951e241ad..4a075d1ea 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -15627,7 +15627,7 @@ spawn_forkshell(struct forkshell *fs, struct job *jp, union node *n, int mode)
15627 new->nprocs = jp == NULL ? 0 : jp->nprocs; 15627 new->nprocs = jp == NULL ? 0 : jp->nprocs;
15628 sprintf(buf, "%p", new->hMapFile); 15628 sprintf(buf, "%p", new->hMapFile);
15629 argv[2] = buf; 15629 argv[2] = buf;
15630 ret = mingw_spawn_proc(argv); 15630 ret = mingw_spawn_forkshell(argv);
15631 CloseHandle(new->hMapFile); 15631 CloseHandle(new->hMapFile);
15632 UnmapViewOfFile(new); 15632 UnmapViewOfFile(new);
15633 if (ret == -1) { 15633 if (ret == -1) {