[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-man
Subject:    Re: execve(2) man page: "absolute pathname" inconsistency
From:       "Alejandro Colomar (man-pages)" <alx.manpages () gmail ! com>
Date:       2021-07-17 12:28:55
Message-ID: 858e578f-f04c-be47-f306-f177d23f229a () gmail ! com
[Download RAW message or body]

Hi Nora and Shawn,

On 7/15/21 6:09 PM, Nora Platiel wrote:
> On 2021-07-03 21:58, Shawn Landden wrote:
> > The absolute pathname is available in the Linux-specific auxiliary-vector
> > feature. Here is a suggested patch:
> 
> I haven't made sense of the comment on the last added line, but the "visible" part \
> looks good to me.

Thanks for the review!  Mind if I add a Reviewed-by line?

I also couldn't understand the comment so much.  Shawn, would you mind
to explain it (or just remove it)?

Thanks,

Alex
> 
> > diff --git a/man2/execve.2 b/man2/execve.2
> > index c18ca5412..66a18af27 100644
> > --- a/man2/execve.2
> > +++ b/man2/execve.2
> > @@ -344,20 +344,27 @@ will be invoked with the following arguments:
> > .EE
> > .in
> > .PP
> > where
> > .I pathname
> > -is the absolute pathname of the file specified as the first argument of
> > +is the pathname of the file specified (may be relative to
> > +.Br getcwd (3)
> > +of the caller) as the first argument of
> > .BR execve (),
> > and
> > .I arg...
> > is the series of words pointed to by the
> > .I argv
> > argument of
> > .BR execve (),
> > starting at
> > .IR argv[1] .
> > +The absolute pathname of the script is also available in same auxiliary vector \
> > the environment and argument variables are in, as +.BR AT_EXECFN .
> > +See
> > +.BR getauxval (3).
> > +,\" I am not sure if this claim is as clear as it can be, but we are already \
> > wasting so much memory for these so.....it would be possible to copy what is \
> > needed out of the environment, and then move the stack back into the massive \
> > environment vector Linux passes (and which has an almost unbounded size). Note \
> >                 that there is no way to get the
> > .IR argv[0]
> > that was passed to the
> > .BR execve ()
> > call.
> > --
> > 2.30.2
> 

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic