1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-17 12:41:05 +03:00
Files
gnulib/doc/posix-functions/mknod.texi
Eric Blake 599bbd2271 mknod: new module
Solaris 9 mknod("name/",mode,dev) mistakenly creates "name" for
non-directory mode.  FreeBSD 7.2 mknod("dangling/",mode,dev)
mistakenly creates the target of the symlink if run as root.
FreeBSD and OpenBSD mknod("fifo",S_IFIFO|mode,0) fails for non-root.
Use of mknod caused link failures on mingw.

* modules/mknod: New file.
* m4/mknod.m4 (gl_FUNC_MKNOD): Likewise.
* lib/mknod.c (mknod): Likewise.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Set witness
defaults.
* modules/sys_stat (Makefile.am): Substitute them.
* lib/sys_stat.in.h (mknod): Declare replacement.
* MODULES.html.sh (Support for systems lacking POSIX:2008):
Document it.
* doc/posix-functions/mknod.texi (mknod): Likewise.
* modules/mknod-tests: New test.
* tests/test-mknod.c: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-11 19:24:35 -07:00

30 lines
746 B
Plaintext

@node mknod
@section @code{mknod}
@findex mknod
POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/mknod.html}
Gnulib module: mknod
Portability problems fixed by Gnulib:
@itemize
@item
This function requires super-user privileges to create a fifo:
FreeBSD 7.2, OpenBSD 3.8.
@item
This function mishandles trailing slash on some platforms:
FreeBSD 7.2, Solaris 9.
@item
This function is missing on some platforms; however, the replacement
always fails with @code{ENOSYS}:
mingw.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
Use of this function for anything except fifos is not portable,
generally requiring super-user privileges and knowledge of supported
device numbers.
@end itemize