diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-12-16 00:25:17 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-12-16 00:25:17 +0100 |
commit | 2bef526331a194da199993ec747598f625a5a9a8 (patch) | |
tree | 4915779211de083dccfce00e9da5942f2e626120 | |
parent | d6f5000c1303ca7c31759d380fe154a46bd7126b (diff) | |
download | busybox-w32-2bef526331a194da199993ec747598f625a5a9a8.tar.gz busybox-w32-2bef526331a194da199993ec747598f625a5a9a8.tar.bz2 busybox-w32-2bef526331a194da199993ec747598f625a5a9a8.zip |
ash: add comment about bash's ENOEXEC handling. No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index 14472cb61..d02b74a4c 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -7435,6 +7435,12 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char ** | |||
7435 | * | 7435 | * |
7436 | * That is, do not use $SHELL, user's shell, or /bin/sh; | 7436 | * That is, do not use $SHELL, user's shell, or /bin/sh; |
7437 | * just call ourselves. | 7437 | * just call ourselves. |
7438 | * | ||
7439 | * Note that bash reads ~80 chars of the file, and if it sees | ||
7440 | * a zero byte before it sees newline, it doesn't try to | ||
7441 | * interpret it, but fails with "cannot execute binary file" | ||
7442 | * message. For one, it prevents atempts to interpret | ||
7443 | * foreign ELF binaries as shell scripts. | ||
7438 | */ | 7444 | */ |
7439 | char **ap; | 7445 | char **ap; |
7440 | char **new; | 7446 | char **new; |