This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5786] sysconf(_SC_ARG_MAX) no longer accurate since Linux kernel 2.6.23
- From: "carlos at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 26 Feb 2008 13:57:17 -0000
- Subject: [Bug libc/5786] sysconf(_SC_ARG_MAX) no longer accurate since Linux kernel 2.6.23
- References: <20080222153833.5786.michael.kerrisk@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From carlos at codesourcery dot com 2008-02-26 13:57 -------
I think we are in agreement here:
A. It is worthwhile to recommend a change to POSIX.1, making note that ARG_MAX
is now variable. The exact wording of the change is up for discussion.
Let me clarify the following issues:
1. The kernel must not lower the value of ARG_MAX in include/linux/limits.h.
This would break binary compatibility.
2. I would propose that RLIMIT_ARG_MAX be a read and write value. How the kernel
implements this does not have to be discussed here.
3. glibc would use getrlimit(RLIMIT_ARG_MAX, &lim); to determine if the
currently running kernel supports a variable size of argument and environ space.
Notes:
- Without (2) and (3) userspace lacks a programmatic way to determine the [argv
+ environ] space limit. Userspace could still probe the size by repeatedly
calling execve and looking for E2BIG errors, unfortunately there are performance
considerations.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5786
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.