Commit Graph

78 Commits

Author SHA1 Message Date
Michael Kerrisk 6b34fb3f5a execve.2, pipe.2, tee.2, fmemopen.3, mq_notify.3, qsort.3: Replace use of assert() by code that checks argc
See http://bugzilla.kernel.org/show_bug.cgi?id=13569

As noted by Andrey:
The purpose of the assert macro, defined in <assert.h>,
is to provide a tool to check for programming mistakes
or program logic errors. However, the assert macro must
never be used to perform checks for run time errors,
since, with the NDEBUG macro defined, expressions within
the assert macro invocations are not evaluated/checked
for, resulting in behavior that was not originally intended.
...
The pages affected in the core package are

execve(2)
pipe(2)
tee(2)
fmemopen(3)
mq_notify(3)
qsort(3)

Reported-by: Andrey Vihrov <vihrov@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-09-28 12:46:19 +02:00
Mike Frysinger c62e7abad4 execve.2: Remove erroneous statement that pending signal set is cleared on execve(2)
Reported-by: Christopher Head <chead@telus.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-04-21 14:35:39 +12:00
Michael Kerrisk 804f03e657 clock_nanosleep.2, execve.2, fork.2, nanosleep.2, sigaction.2, timerfd_create.2, pthread_getcpuclockid.3, ualarm.3, usleep.3, pthreads.7, time.7: Global fix: s/(3)/(2)/ in section number xrefs for timer_*() API
The POSIX timers API is implemented (mostly) within the kernel,
so thse interfaces are system calls.  Although there are as yet
no man pages, when they are added they should be in Section 2,
not 3.  Therefore fix those pages that currently refer to these
interfaces as being in Section 3.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-02-09 12:29:10 +13:00
Michael Kerrisk 56b466899c execve.2: ffix 2008-11-28 09:39:38 -05:00
Michael Kerrisk b43a3b301e eventfd.2, execve.2, getdents.2, ioprio_set.2, mprotect.2, signalfd.2, timerfd_create.2, wait.2, backtrace.3, clock_getcpuclockid.3, end.3, fmemopen.3, fopencookie.3, frexp.3, getdate.3, getgrouplist.3, getprotoent_r.3, getservent_r.3, gnu_get_libc_version.3, inet.3, inet_pton.3, makecontext.3, malloc.3, matherr.3, offsetof.3, pthread_attr_init.3, pthread_create.3, pthread_getattr_np.3, sem_wait.3, strftime.3, strtok.3, strtol.3, core.5, proc.5, cpuset.7, mq_overview.7: Global fix: Format user input in shell sessions in boldface
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-10-29 14:54:23 -05:00
Michael Kerrisk acddbaea0c Removed trailing white space at end of lines 2008-10-07 10:58:44 +02:00
Michael Kerrisk 3a9dc9ff79 execve.2: _SC_ARG_MAX is no longer necessarily constant
POSIX.1-2001 says that the values returned by sysconf()
are constant for the life of the process.
But the fact that, since Linux 2.6.23, ARG_MAX is settable
via RLIMIT_STACK means _SC_ARG_MAX is no longer constant,
since it can change at each execve().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-10-05 05:59:32 +02:00
Michael Kerrisk f202015b45 execve.2: Linux now imposes a floor on the ARG_MAX limit
Starting with Linux 2.6.23, the ARG_MAX limit became settable via
(1/4 of) RLIMIT_STACK.  This broke ABI compatibility if RLIMIT_STACK
was set such that ARG_MAX was < 32 pages.  Document the fact that
since 2.6.25 Linux imposes a floor on ARG_MAX, so that the old limit
of 32 pages is guaranteed.

For some background on the changes to ARG_MAX in kernels 2.6.23 and
2.6.25, see:
    http://sourceware.org/bugzilla/show_bug.cgi?id=5786
    http://bugzilla.kernel.org/show_bug.cgi?id=10095
    http://thread.gmane.org/gmane.linux.kernel/646709/focus=648101,
    checked into 2.6.25 as commit a64e715fc74b1a7dcc5944f848acc38b2c4d4ee2.

Also some reordering/rewording of the discussion of ARG_MAX.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-10-05 05:57:52 +02:00
Michael Kerrisk f3504b0292 srcfix 2008-10-05 03:29:35 +02:00
Michael Kerrisk bf50110267 execve.2: updated FIXME (for argv==NULL) in source comments 2008-10-03 06:04:03 +02:00
Michael Kerrisk 6c48afffcf wfix 2008-08-07 11:08:15 +00:00
Michael Kerrisk 2fb19a1619 The floating-point environment is reset to the default
during an execve().
2008-08-07 10:54:18 +00:00
Michael Kerrisk f0c34053bc Put SEE ALSO section into alphabetical order. 2008-07-14 15:52:21 +00:00
Michael Kerrisk 80d26cefad ffix 2008-06-26 13:28:19 +00:00
Michael Kerrisk 5b8dbfd4d0 ffixes 2008-06-26 13:23:48 +00:00
Michael Kerrisk a1d5601bee Removed trailing white space at end of lines 2008-06-12 11:52:08 +00:00
Michael Kerrisk 34dcae5481 Fix text that warns against use of NULL argv and envp.
Using a NULL envp does in fact seem to be portable (works
on Solaris and FreeBSD), but the Linux semantics for a NULL
argv certainly aren't consistent with other implementations.
See http://bugzilla.kernel.org/show_bug.cgi?id=8408.
2008-06-12 10:11:21 +00:00
Michael Kerrisk 24d01c530c s/filesystem/file system/ 2008-03-19 07:26:08 +00:00
Michael Kerrisk c15e4069f6 Added FIXME. 2008-02-22 15:38:58 +00:00
Michael Kerrisk e5a7fca5cc Clarify detail of RLIMIT_STACK/4 limit for argv+environ. 2008-02-22 15:18:34 +00:00
Michael Kerrisk e415892486 ffix 2007-12-25 21:41:35 +00:00
Michael Kerrisk d061dbacc3 spfix 2007-12-22 20:50:00 +00:00
Michael Kerrisk 4a8d10ef27 Minor rewordings 2007-12-22 17:00:19 +00:00
Michael Kerrisk 088a639be3 Make the standard indent for code samples, shell session
logs, etc. to be ".in +4n".
2007-12-19 06:57:44 +00:00
Michael Kerrisk 2777b1caec Remove section numbers for page references where the
reference refers to the page itself.  (This stops man2html
producing links from a page back to itself.)
2007-11-24 10:10:39 +00:00
Michael Kerrisk 3a16ac7aed ffix 2007-11-21 18:17:59 +00:00
Michael Kerrisk 71f66746c7 ffix 2007-11-18 07:31:02 +00:00
Michael Kerrisk 0daa9e92d0 Fix redundant formatting macros 2007-09-20 16:26:31 +00:00
Michael Kerrisk c11b1abf2e Change mtk's email address 2007-09-20 06:52:22 +00:00
Michael Kerrisk d739f5f8c7 Add text describing limit on total size of argv + evnp,
and changes that occurred with 2.6.23.
Add getopt(3) to SEE ALSO list.
2007-09-10 04:31:59 +00:00
Michael Kerrisk a8d5553785 ffix 2007-07-18 20:24:30 +00:00
Michael Kerrisk 5260fe08cf Use 'glibc' consistently to refer to GNU C library. 2007-07-09 22:01:31 +00:00
Michael Kerrisk 3f624b939f grfix 2007-07-08 12:51:09 +00:00
Michael Kerrisk 682edefb1b ffix 2007-06-22 17:16:20 +00:00
Michael Kerrisk 988db66164 strip trailing white space 2007-06-21 22:55:04 +00:00
Michael Kerrisk 8bd58774dc Formatted signal names 2007-06-21 05:38:48 +00:00
Michael Kerrisk 75b94dc35c Change "e.g. " to "e.g., ", or in some cases, "for example, ".
Change "i.e. " to i.e.., ", or in some cases, "that is, ".
2007-06-08 11:56:22 +00:00
Michael Kerrisk eb1af89677 Corrected minor spelling/wording mistakes (i.e., changes
independent of fixes for American spelling).
2007-06-08 10:58:53 +00:00
Michael Kerrisk d9bfdb9c21 Convert to American spelling conventions 2007-06-08 09:56:56 +00:00
Michael Kerrisk 53a1443cce Add SEE ALSO link to new credentials.7. 2007-06-08 07:57:18 +00:00
Michael Kerrisk 677f47663e Wrap source lines at sentence breaks. 2007-06-08 03:17:37 +00:00
Michael Kerrisk d9343c5c13 Removed version number from .TH line 2007-05-30 05:36:26 +00:00
Michael Kerrisk ad7cc990f2 Change reference to path_resolution.2 to path_resolutiion.7 2007-05-26 12:41:39 +00:00
Michael Kerrisk a7e1c01a76 ffix 2007-05-21 21:25:44 +00:00
Michael Kerrisk 8c87824d61 Made .SH into .SS 2007-05-16 02:45:55 +00:00
Michael Kerrisk a44012756e Minor repairs after global edits 2007-05-12 12:53:57 +00:00
Michael Kerrisk 60a90ecdae Convert function formatting of the form "\fBname\fP()" to ".BR name ()". 2007-05-12 09:06:04 +00:00
Michael Kerrisk 0bfa087b03 Add section numbers to references to other pages 2007-05-11 23:07:02 +00:00
Michael Kerrisk b364fca092 Removed some comment text about interpreter scripts, placing
it instead in Changes file.
2007-05-01 14:34:02 +00:00
Michael Kerrisk e506533603 hyphen --> minus 2007-05-01 07:58:48 +00:00