Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
File descriptor
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Operations on the file descriptor table=== The {{mono|fcntl()}} function is used to perform various operations on a file descriptor, depending on the command argument passed to it. There are commands to get and set attributes associated with a file descriptor, including {{mono|F_GETFD, F_SETFD, F_GETFL}} and {{mono|F_SETFL}}. *{{mono|[[close (system call)|close()]]}} *{{mono|closefrom()}} (BSD and Solaris only; deletes all file descriptors greater than or equal to specified number) *{{mono|close_range()}} (for Linux)<ref>{{cite web |url=https://man7.org/linux/man-pages/man2/close_range.2.html |title=close_range(2) β Linux manual page |author=Stephen Kitt, Michael Kerrisk |access-date=2021-03-22 }}</ref> *{{mono|[[dup (system call)|dup()]]}} (duplicates an existing file descriptor guaranteeing to be the lowest number available file descriptor) *{{mono|[[dup2]]()}}, {{mono|[[Dup2|dup3()]]}} (Close fd1 if necessary, and make file descriptor fd1 point to the open file of fd2) *{{mono|fcntl (F_DUPFD)}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)