From 95ad413d4a493285a5560182fb10217819d7c357 Mon Sep 17 00:00:00 2001 From: jilles Date: Fri, 4 Feb 2011 22:47:55 +0000 Subject: sh: Remove special code for shell scripts without magic number. These are called "shell procedures" in the source. If execve() failed with [ENOEXEC], the shell would reinitialize itself and execute the program as a script. This requires a fair amount of code which is not frequently used (most scripts have a #! magic number). Therefore just execute a new instance of sh (_PATH_BSHELL) to run the script. --- bin/sh/mkinit.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'bin/sh/mkinit.c') diff --git a/bin/sh/mkinit.c b/bin/sh/mkinit.c index 89385ff..82f2a55 100644 --- a/bin/sh/mkinit.c +++ b/bin/sh/mkinit.c @@ -126,16 +126,10 @@ char reset[] = "\ * interactive shell and control is returned to the main command loop.\n\ */\n"; -char shellproc[] = "\ -/*\n\ - * This routine is called to initialize the shell to run a shell procedure.\n\ - */\n"; - struct event event[] = { { "INIT", "init", init, { NULL, 0, NULL, NULL } }, { "RESET", "reset", reset, { NULL, 0, NULL, NULL } }, - { "SHELLPROC", "initshellproc", shellproc, { NULL, 0, NULL, NULL } }, { NULL, NULL, NULL, { NULL, 0, NULL, NULL } } }; -- cgit v1.1