From: Sebastian Geiger <sbastig-hi6Y0CQ0nG0@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: man execve / Suggestion
Date: Mon, 04 Jul 2011 17:11:14 +0200 [thread overview]
Message-ID: <4E11D812.2080600@gmx.net> (raw)
I would like to suggest an improvement on the execve man-page (Page
Version 3.27). In the description of the execve system call I would
suggest to add a reminder that the argv arrays need to have put the
programm name as its first argument.
For the unexperienced it is easy to write something as such:
char* program = "/usr/bin/ls";
char* file = "-lah";
char* argv[] = {file, NULL}; //should be {program, file, NULL}
char* envp[] = {NULL};
execve(eog, argv, envp);
For the experienced programmers this is probably obvious, yet for those
more unexperienced it would be a useful hint if the man-page said
something like:
"Remember the first argument in the argv array should be the path to the
programm that is about to be executed and your custom arguments should
start from the second position."
Regards
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2011-07-04 15:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-04 15:11 Sebastian Geiger [this message]
[not found] ` <4E11D812.2080600-hi6Y0CQ0nG0@public.gmane.org>
2011-09-17 5:13 ` man execve / Suggestion Michael Kerrisk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E11D812.2080600@gmx.net \
--to=sbastig-hi6y0cq0ng0@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox