io_close(3) Library Functions Manual io_close(3)NAME
io_close - close a file descriptor
SYNTAX
#include <io.h>
void io_close(int64 fd);
DESCRIPTION
io_close eliminates the descriptor numbered fd. This usually does not mean eliminating the object that the descriptor is talking to. (For
example, if a descriptor writes to a named disk file, closing the descriptor will not remove the file; it simply removes one way of writing
to the file. On the other hand, a pipe disappears as soon as no descriptors refer to it.)
io_close has no return value; it always succeeds in deallocating the memory used for the descriptor. If fd is not the number of a descrip-
tor, io_close has no effect.
io_close() is like close(), but it also removes the descriptor from the internal io_wait() data structures. If you called io_fd on a
descriptor, you need to use io_close to close it, not just close().
SEE ALSO io_wait(3), io_canwrite(3)io_close(3)
Check Out this Related Man Page
CLOSE(2) System Calls Manual CLOSE(2)NAME
close - delete a descriptor
SYNOPSIS
close(d)
int d;
DESCRIPTION
The close call deletes a descriptor from the per-process object reference table. If this is the last reference to the underlying object,
then it will be deactivated. For example, on the last close of a file the current seek pointer associated with the file is lost; on the
last close of a socket(2) associated naming information and queued data are discarded; on the last close of a file holding an advisory lock
the lock is released (see further flock(2)).
A close of all of a process's descriptors is automatic on exit, but since there is a limit on the number of active descriptors per process,
close is necessary for programs that deal with many descriptors.
When a process forks (see fork(2)), all descriptors for the new child process reference the same objects as they did in the parent before
the fork. If a new process is then to be run using execve(2), the process would normally inherit these descriptors. Most of the descrip-
tors can be rearranged with dup2(2) or deleted with close before the execve is attempted, but if some of these descriptors will still be
needed if the execve fails, it is necessary to arrange for them to be closed if the execve succeeds. For this reason, the call ``fcntl(d,
F_SETFD, 1)'' is provided, which arranges that a descriptor will be closed after a successful execve; the call ``fcntl(d, F_SETFD, 0)''
restores the default, which is to not close the descriptor.
RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the global integer variable errno is set to
indicate the error.
ERRORS
Close will fail if:
[EBADF] D is not an active descriptor.
SEE ALSO accept(2), flock(2), open(2), pipe(2), socket(2), socketpair(2), execve(2), fcntl(2)4th Berkeley Distribution May 22, 1986 CLOSE(2)
On my application there are lots of users are doing there work or tasks? ...In my SSH or in 'Putty' i am observing logs?
Hot to observe one particular 'user' logs.. even through there are lots of users working on it?
For EX: i am log in with use rid:nikhil@in.com. another one log in with... (4 Replies)
Hi,
Need help in understanding the behaviour of the find command.
I am writing a command to find out all the known errors in the log files and console files. That would help me in understanding the health of the application server. I have written the below command that would run a few execs' in... (1 Reply)
I would like to seek help on my LED REST API. I have finished constructed my basic REST API for my Raspberry PI. What I'm trying to do now is allow my LED to light up whenever I key localhost:3000/7/1 and key localhost:3000/7/0 to switch off. But my problem now is my REST API can't works and hope... (0 Replies)
Heya
I'm using Awesome WM with the Vicious widget library.
As i'm using multi boot, Win8, Fedora and Arch, i have my WM-Config shared accross my GNU/Linux installations.
The regarding snippet:
-- Functions
-- Its just a workaround for an 'unstable' 'hwmon/hwmon' definition of Fedora21 -... (0 Replies)
Heyas
I'm having a bad time to fix this.
Code is just related samples, paths are edited, take: ~/.config/awesome as 'base/config' (dot) dir.
Situation:
Recently i actualy started to have 2 different kinds of gnu/linux installed, with this, the abition raised, to get a distro specific icon... (1 Reply)
Hi fellas and fella-esses...
There are numerous threads on here where people ask for, and often expect, solutions to difficult problems solved using _one_liners_.
Why do they insist as such when it is virtually no different in execution time with well thought out indented code?
Is it me... (12 Replies)