Bug 84701
Summary: | execve(2) manual page ".sh" usage exposes implementation detail | ||
---|---|---|---|
Product: | Documentation | Reporter: | Alex (erlkonig) |
Component: | man-pages | Assignee: | documentation_man-pages (documentation_man-pages) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | mtk.manpages |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: |
Description
Alex
2014-09-17 00:15:55 UTC
Alex, thanks for the detailed report. I've applied the patch below. Cheers, Michael diff --git a/man2/execve.2 b/man2/execve.2 index 0b06974..dfa933b 100644 --- a/man2/execve.2 +++ b/man2/execve.2 @@ -729,10 +729,10 @@ program: .in +4n .nf -.RB "$" " cat > script.sh" -.B #! ./myecho script-arg +.RB "$" " cat > script" +.B #!./myecho script-arg .B ^D -.RB "$" " chmod +x script.sh" +.RB "$" " chmod +x script" .fi .in @@ -740,10 +740,10 @@ We can then use our program to exec the script: .in +4n .nf -.RB "$" " ./execve ./script.sh" +.RB "$" " ./execve ./script" argv[0]: ./myecho argv[1]: script-arg -argv[2]: ./script.sh +argv[2]: ./script argv[3]: hello argv[4]: world .fi |