mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-05 09:10:18 +02:00
fcntl: support F_DUPFD_CLOEXEC and O_CLOEXEC.
* libguile/filesys.c (scm_fcntl): Document F_DUPFD_CLOEXEC. (scm_init_filesys): Define O_CLOEXEC and F_DUPFD_CLOEXEC.
This commit is contained in:
parent
86150ed040
commit
a01a9308f0
1 changed files with 9 additions and 1 deletions
|
@ -948,7 +948,9 @@ SCM_DEFINE (scm_fcntl, "fcntl", 2, 1, 0,
|
||||||
"Values for @var{cmd} are:\n\n"
|
"Values for @var{cmd} are:\n\n"
|
||||||
"@table @code\n"
|
"@table @code\n"
|
||||||
"@item F_DUPFD\n"
|
"@item F_DUPFD\n"
|
||||||
"Duplicate a file descriptor\n"
|
"Duplicate a file descriptor.\n"
|
||||||
|
"@item F_DUPFD_CLOEXEC\n"
|
||||||
|
"Duplicate a file descriptor, setting the @code{FD_CLOEXEC} flag.\n"
|
||||||
"@item F_GETFD\n"
|
"@item F_GETFD\n"
|
||||||
"Get flags associated with the file descriptor.\n"
|
"Get flags associated with the file descriptor.\n"
|
||||||
"@item F_SETFD\n"
|
"@item F_SETFD\n"
|
||||||
|
@ -1844,10 +1846,16 @@ scm_init_filesys ()
|
||||||
#ifdef O_NOTRANS
|
#ifdef O_NOTRANS
|
||||||
scm_c_define ("O_NOTRANS", scm_from_int (O_NOTRANS));
|
scm_c_define ("O_NOTRANS", scm_from_int (O_NOTRANS));
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef O_CLOEXEC
|
||||||
|
scm_c_define ("O_CLOEXEC", scm_from_int (O_CLOEXEC));
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef F_DUPFD
|
#ifdef F_DUPFD
|
||||||
scm_c_define ("F_DUPFD", scm_from_int (F_DUPFD));
|
scm_c_define ("F_DUPFD", scm_from_int (F_DUPFD));
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef F_DUPFD_CLOEXEC
|
||||||
|
scm_c_define ("F_DUPFD_CLOEXEC", scm_from_int (F_DUPFD_CLOEXEC));
|
||||||
|
#endif
|
||||||
#ifdef F_GETFD
|
#ifdef F_GETFD
|
||||||
scm_c_define ("F_GETFD", scm_from_int (F_GETFD));
|
scm_c_define ("F_GETFD", scm_from_int (F_GETFD));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue