Skip to content

Commit

Permalink
execve.2: execve also returns E2BIG if a string is too long
Browse files Browse the repository at this point in the history
The execve syscall returns -E2BIG in 3 cases:
- The total length of the command line arguments and environment is too large.
- An argument or environment string is longer than MAX_ARG_STRLEN.
- The full path to the executable exceeds MAX_ARG_STRLEN.

Spell out all 3 cases in the -E2BIG section.

Signed-off-by: Rik van Riel <[email protected]>
Suggested-by: Matthew House <[email protected]>
  • Loading branch information
rikvanriel committed Oct 11, 2023
1 parent ae6b221 commit f42cb91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion man2/execve.2
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@ The total number of bytes in the environment
.RI ( envp )
and argument list
.RI ( argv )
is too large.
is too large, an argument or environment string is too long, or
the full path name to the executable is too long.
.TP
.B EACCES
Search permission is denied on a component of the path prefix of
Expand Down

0 comments on commit f42cb91

Please sign in to comment.