Commit Graph

5949 Commits

Author SHA1 Message Date
Michael Kerrisk 0335565faa resolver.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:51:26 +01:00
Michael Kerrisk a2d427c1a6 initgroups.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:50:06 +01:00
Michael Kerrisk 7457600f6e getutent.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:49:28 +01:00
Michael Kerrisk d0b8a8d817 getmntent.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:48:20 +01:00
Michael Kerrisk 0578c69df2 fgetpwent.3: Add missing ATTRIBUTES preamble
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:46:28 +01:00
Michael Kerrisk d2cd45885b errno.3: 'errno -s' can be used to search for errors by string in description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-23 08:43:20 +01:00
Michael Kerrisk 10b6adae8a fts.3: fts_pathlen = strlen(fts_path) + strlen(fts_name)
As noted by Pradeep (and I tested also the code on OpenBSD):

The man page for fts library call states both the following:

     short          fts_pathlen;  /* strlen(fts_path) */

     fts_pathlen The length of the string referenced by fts_path

However, for the structures returned from fts_children() function,
fts_pathlen is strlen(fts_path) + strlen(fts_name), which contradicts
the man page statement. So I believe that there is either a bug in the
man page or the fts_children() library call.

The following program can be used for verification:

int main() {
	struct passwd *pwd_entry = getpwuid(getuid());
	char *paths[] = {pwd_entry->pw_dir, NULL};
	FTS* fts = fts_open(paths, FTS_LOGICAL, NULL);
	FTSENT* ftsent = fts_read(fts);
	FTSENT* child = fts_children(fts, 0);
	while (child != NULL) {
		printf("\n %s %s %d %lu", child->fts_path, child->fts_name,
				child->fts_pathlen, strlen(child->fts_path));
		child = child->fts_link;
	}
	return 0;
}

Reported-by: Pradeep Kumar <pradeepsixer@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-19 07:24:41 +01:00
Michael Kerrisk 3ca4400d74 usleep.3: Minor wording fix
Reported-by: Eric Benton <erbenton@comcast.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-18 17:19:07 +01:00
Michael Kerrisk 6386c0c862 errno.3: Add Linux error text corresponding to ENOMEM
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-16 00:09:16 +01:00
G. Branden Robinson 777411ae61 iconv.1, pthread_rwlockattr_setkind_np.3, man-pages.7, socket.7, iconvconfig.8: Standardize on "nonzero"
Also add this term to the style guide in man-pages(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-05 22:27:13 +01:00
roblabla 0f24751222 pthread_mutexattr_init.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-05 22:27:06 +01:00
Michael Kerrisk 1c6f59c276 getpid.2, pipe.2, abort.3, daemon.3, pthread_yield.3, stdio.3, sysconf.3, tty.4, shells.5, sysfs.5, fifo.7, hier.7, icmp.7, path_resolution.7, pid_namespaces.7, standards.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-26 12:38:46 +01:00
Michael Kerrisk d2414cb5a1 makedev.3: Minor fixes to Adrian Bunk's patch
Note glibc version where deprecation occurred.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-25 14:23:05 +01:00
Adrian Bunk 1e50980d0f makedev.3: glibc has deprecated exposing the definitions via <sys/types.h>
Compile warning with glibc 2.25:

    warning: In the GNU C Library, "makedev" is defined by
    <sys/sysmacros.h>. For historical compatibility, it is
    currently defined by <sys/types.h> as well, but we plan to
    remove this soon.  To use "makedev", include <sys/sysmacros.h>
    directly. If you did not intend to use a system-defined macro
    "makedev", you should undefine it after including
    <sys/types.h>.

Background: glibc commit dbab6577c6684c62bd2521c1c29dc25c3cac966f

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-25 14:18:41 +01:00
Michael Kerrisk 7d4151a5c3 errno.3: Remove an unnecessary sentence
Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:24:53 +01:00
Michael Kerrisk b01ecc5e1d errno.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:24:21 +01:00
Michael Kerrisk 5a99c72245 errno.3: Note the use of perror(3) and strerror(3)
Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:49:32 +01:00
Michael Kerrisk afde18c00a errno.3: Minor wording change
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:59 +01:00
Michael Kerrisk f79214781c errno.3: Explicitly note that error numbers vary also across UNIX systems
Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 6eb4b782a0 errno.3: Recast the advice against manually declaring 'errno'
Recast the advice against manually declaring 'errno' to
a more modern perspective. It's 13 years since the original
text was added, and even then it was describing old behavior.
Cast the description to be about behavior further away in
time, and note more clearly that manual declaration will
cause problems with modern C libraries.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 5db92f96f4 errno.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 44a35dc807 errno.3: Note use of errno(1) to look up error names and numbers
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk bf3683a153 errno.3: Note that error numbers vary somewhat across architectures
Added after a patch from Wesley Aptekar-Cassels that proposed
to add error numbers to the text.

Reported-by: Wesley Aptekar-Cassels <w.aptekar@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 9d1a5fa63e errno.3: Error numbers are positive values (rather than nonzero values)
POSIX.1-2008 noted the explicitly the change (to align with
the C standards) that error numbers are positive, rather
than nonzero.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk b89ec85240 errno.3: Reorganize the text and and some subheadings
Restructure the text and add some subheadings for better
readability. No (intentional) content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk c288d6b50d errno.3: Note the <errno.h> also provides the symbolic error names
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk a9641f84a1 errno.3: Minor text reorganization
No content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk e4a5b66224 errno.3: Minor rewording/reformatting
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk 5a63455fb3 errno.3: Update error list for POSIX.1-2008
POSIX.1-2008 specified a couple of new errors not present in
POSIX.1-2001.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk c106a226b3 errno.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk 975c0f87a2 errno.3: Add some missing errors
Based on comparing the filtered content of the two main
kernel errno files:

    cat include/uapi/asm-generic/errno.h \
        include/uapi/asm-generic/errno-base.h | grep define | \
        grep -v 'define _' | awk '{print $2}' | sort -u

to see what is absent from this page, and used in either kernel
or glibc.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk 7a951861cb exec.3: glibc 2.24 dropped CWD from the defaul path
Document the glibc 2.24 change that dropped CWD from the default
search path employed by execlp(), execvp() and execvpe() when
PATH is not defined.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 20:31:12 +01:00
Michael Kerrisk fefbc57db0 popen.3: Add a cross reference to Caveats in system(3)
All of the same risks regarding system() also apply to popen().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:17:10 +01:00
Michael Kerrisk 2e039d4db5 system.3: Mention file capabilities in discussion of privileged programs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:15:10 +01:00
Michael Kerrisk 067f80642b system.3: Note that user input for system() should be carefully sanitized
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:15:10 +01:00
Michael Kerrisk 1f87e63922 system.3: Minor rewording
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:03:09 +01:00
Michael Kerrisk a1a1c8ce19 system.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:02:14 +01:00
Michael Kerrisk 3b9f2b67e7 system.3: Mention PATH explicitly in discussion of system and set-UID programs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:00:56 +01:00
Michael Kerrisk bd64aa6435 system.3: Correctly note which shell Debian uses as (noninteractive) /bin/sh
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:00:56 +01:00
Michael Kerrisk a6be81bab9 system.3: Create a "Caveats" subsection to hold warnings about the use of system()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 14:54:00 +01:00
Seonghun Lim 0fd299bf6c strverscmp.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:34:05 +01:00
Seonghun Lim d42ffdf8e3 sockatmark.3: Fix cruft in code example
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:33:26 +01:00
Seonghun Lim 35ed4d7ea0 random_r.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:30:29 +01:00
Seonghun Lim 6da3279c45 stdio.3: wsfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:28:08 +01:00
Seonghun Lim 6968bea38c stdin.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:27:07 +01:00
Seonghun Lim be4c9c66c1 atexit.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:26:36 +01:00
Lucas Werkmeister e4631a3524 system.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-07 23:14:27 +01:00
Michael Kerrisk 247bbcf00c ffs.3: glibc 2.27 relaxes the FTM requriements for ffsl() nand ffsll()
glibc 2.27 relaxes the FTM requriements for ffsl() and
ffsll() to _DEFAULT_SOURCE.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-02 08:20:26 +01:00
Michael Kerrisk 5f70d096ae stdio.3: Remove crufty reference to pc(1)
I'm not sure what compiler is referred to by "pc(1)",
but "dnf whatprovides" and web searches turn up no
mention of a compiler by that name.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-29 13:23:55 +01:00
Michael Kerrisk 3242546c6e stdio.3: Use proper section cross references in function list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-29 13:23:55 +01:00