Re: [patch] exec.3: explain function groupings

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

 



Hi Matthew,

On 3/27/19 9:21 AM, Matthew Kenigsberg wrote:
Hi,

I've found the exec man page quite difficult to read when trying to
find the behavior for a specific function. Since the names of the
functions are inline and the order of the descriptions isn't clear,
it's hard to find which paragraphs apply to each function. I thought
it would be much easier to read if the grouping based on letters is
stated.

I wrote a patch against version 5.00.

Thanks, but our patch doesn't apply. At the least, it looks like
your mailer wrapped some lines. But even after I fixed the obvious
line wrap issue, the patch still didn't apply (and I tried
reverting to 5.00 to be sure). Could you take another look please.

Thanks,

Michael

Thanks!
Matthew

diff --git a/man3/exec.3 b/man3/exec.3
index 499a05358..a0d582bed 100644
--- a/man3/exec.3
+++ b/man3/exec.3
@@ -80,14 +80,12 @@ for further details about the replacement of the
current process image.)
  The initial argument for these functions is the name of a file that is
  to be executed.
  .PP
+The functions can be grouped based on the letters following exec.
+.SS l - execl(), execlp(), execle()
+.PP
  The
  .I "const char\ *arg"
-and subsequent ellipses in the
-.BR execl (),
-.BR execlp (),
-and
-.BR execle ()
-functions can be thought of as
+and subsequent ellipses can be thought of as
  .IR arg0 ,
  .IR arg1 ,
  \&...,
@@ -101,44 +99,35 @@ The list of arguments
  be terminated by a null pointer,
  and, since these are variadic functions, this pointer must be cast
  .IR "(char\ *) NULL" .
+.SS v - execv(), execvp(), execvpe()
  .PP
  The
-.BR execv (),
-.BR execvp (),
-and
-.BR execvpe ()
-functions provide an array of pointers to null-terminated strings that
+.I "char\ *const argv[]"
+argument is an array of pointers to null-terminated strings that
  represent the argument list available to the new program.
  The first argument, by convention, should point to the filename
  associated with the file being executed.
  The array of pointers
  .I must
  be terminated by a null pointer.
+.SS e - execle(), execvpe()
  .PP
-The
-.BR execle ()
-and
-.BR execvpe ()
-functions allow the caller to specify the environment of the
-executed program via the argument
+The environment of the caller is specified via the argument
  .IR envp .
  The
  .I envp
  argument is an array of pointers to null-terminated strings and
  .I must
  be terminated by a null pointer.
-The other functions take the environment for the new process
+All other
+.BR exec ()
+functions take the environment for the new process
  image from the external variable
  .I environ
  in the calling process.
-.SS Special semantics for execlp(), execvp(), and execvpe()
+.SS p - execlp(), execvp(), execvpe()
  .PP
-The
-.BR execlp (),
-.BR execvp (),
-and
-.BR execvpe ()
-functions duplicate the actions of the shell in
+These functions duplicate the actions of the shell in
  searching for an executable file
  if the specified filename does not contain a slash (/) character.
  The file is sought in the colon-separated list of directory pathnames




[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