From cbfa58d56c3ca59538bf23e30105ce27ed5ef948 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 4 Sep 2024 12:47:03 +0100 Subject: ash: optimise running of scripts (2) Commit 4b7b4a960 (ash: optimise running of scripts) avoided creation of a process when running a script. There's another case where we can do the same: if the script is being run from a FS_SHELLEXEC shell. - Check the necessary conditions for this to happen. - Allocate two extra slots in the argv array for FS_SHELLEXEC. - Set the index of the script file in the argv array. Without this the test 'pidof this' failed because the command name hadn't been correctly set. Adds 80-96 bytes. --- include/mingw.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/mingw.h b/include/mingw.h index ed7884e39..65940b40b 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -667,3 +667,4 @@ enum { ADMIN_ENABLED = 2 }; int elevation_state(void); +void set_interp(int i) FAST_FUNC; -- cgit v1.2.3-55-g6feb