[PATCH] execve.2: add more detail about Shebangs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Shawn Landden <shawn@xxxxxxx>
---
 man2/execve.2 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/man2/execve.2 b/man2/execve.2
index a052f34b0..c363214c0 100644
--- a/man2/execve.2
+++ b/man2/execve.2
@@ -336,6 +336,14 @@ For portable use,
 should either be absent, or be specified as a single word (i.e., it
 should not contain white space); see NOTES below.
 .PP
+The maximum length of the shebang line is 128 bytes, and excess bytes will be truncated.
+.\" https://lwn.net/Articles/779997/ The case of the supersized shebang
+The interpreter is passed the absolute filename to the file. There is no way to get the argv[0]
+that was passed to the kernel via execve(2).
+.\" See the P - preserve-argv[0] option.
+.\" Documentation/admin-guide/binfmt-misc.rst
+.\" https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
+.PP
 Since Linux 2.6.28,
 .\" commit bf2a9a39639b8b51377905397a5005f444e9a892
 the kernel permits the interpreter of a script to itself be a script.
-- 
2.20.1




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux