All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 216876] New: prototype for execveat() in the documentation appears wrong
@ 2023-01-02  3:47 bugzilla-daemon
  2023-01-02 15:26 ` [Bug 216876] " bugzilla-daemon
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bugzilla-daemon @ 2023-01-02  3:47 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=216876

            Bug ID: 216876
           Summary: prototype for execveat() in the documentation appears
                    wrong
           Product: Documentation
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: low
          Priority: P1
         Component: man-pages
          Assignee: documentation_man-pages@kernel-bugs.osdl.org
          Reporter: markgaleck@gmail.com
        Regression: No

prototype for execveat() in the documentation is:

int execveat(int dirfd, const char *pathname,
                    const char *const argv[], const char *const envp[],
                    int flags);


This appears to be inconsistent with similar functions, other documentation,
and my sources (latest Ubuntu distribution). 


I think two of the "const" should be dropped so that we should have:

int execveat(int dirfd, const char *pathname,
                    char *const argv[], char *const envp[],
                    int flags);

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 216876] prototype for execveat() in the documentation appears wrong
  2023-01-02  3:47 [Bug 216876] New: prototype for execveat() in the documentation appears wrong bugzilla-daemon
@ 2023-01-02 15:26 ` bugzilla-daemon
  2023-05-19 13:21 ` bugzilla-daemon
  2023-05-19 13:23 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2023-01-02 15:26 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=216876

--- Comment #1 from Florian Weimer (fweimer@redhat.com) ---
* Alejandro Colomar via Libc-alpha:

> It seems that glibc added a wrapper recently, and I didn't check that
> the prototype changed:
>
> alx@asus5775:~/src/gnu/glibc$ grepc execveat
> ./posix/unistd.h:300:
> extern int execveat (int __fd, const char *__path, char *const __argv[],
>                      char *const __envp[], int __flags)
>     __THROW __nonnull ((2, 3));
>
>
> ./sysdeps/unix/sysv/linux/execveat.c:25:
> int
> execveat (int dirfd, const char *path, char *const argv[], char *const
> envp[],
>           int flags)
> {
>   /* Avoid implicit array coercion in syscall macros.  */
>   return INLINE_SYSCALL_CALL (execveat, dirfd, path, &argv[0], &envp[0],
>                             flags);
> }
>
>
> I CCd glibc so that they can comment.

POSIX uses these types for fexecve and execve, and it seemed right to be
consistent with that.

There are several more manual pages which do not specify the correct
prototype: open, openat, prctl.  I have received compiler bug reports
when people used function pointers modeled after the declarations of
open and prctl in the manual pages because of the ABI mismatch with the
glibc implementations.  The execveat difference is harmless in
comparison.

Thanks,
Florian

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 216876] prototype for execveat() in the documentation appears wrong
  2023-01-02  3:47 [Bug 216876] New: prototype for execveat() in the documentation appears wrong bugzilla-daemon
  2023-01-02 15:26 ` [Bug 216876] " bugzilla-daemon
@ 2023-05-19 13:21 ` bugzilla-daemon
  2023-05-19 13:23 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2023-05-19 13:21 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=216876

--- Comment #2 from Alejandro Colomar (alx@kernel.org) ---
Fixed:
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/man2/execveat.2?id=0c884c2c515d20c8ecf246eef5208dc748b98e65>

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 216876] prototype for execveat() in the documentation appears wrong
  2023-01-02  3:47 [Bug 216876] New: prototype for execveat() in the documentation appears wrong bugzilla-daemon
  2023-01-02 15:26 ` [Bug 216876] " bugzilla-daemon
  2023-05-19 13:21 ` bugzilla-daemon
@ 2023-05-19 13:23 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2023-05-19 13:23 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=216876

Alejandro Colomar (alx@kernel.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DOCUMENTED

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-19 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02  3:47 [Bug 216876] New: prototype for execveat() in the documentation appears wrong bugzilla-daemon
2023-01-02 15:26 ` [Bug 216876] " bugzilla-daemon
2023-05-19 13:21 ` bugzilla-daemon
2023-05-19 13:23 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.