Upozornenie: Prezeranie týchto stránok je určené len pre návštevníkov nad 18 rokov!
Zásady ochrany osobných údajov.
Používaním tohto webu súhlasíte s uchovávaním cookies, ktoré slúžia na poskytovanie služieb, nastavenie reklám a analýzu návštevnosti. OK, súhlasím









A | B | C | D | E | F | G | H | CH | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Close (system call)


A close system call is a system call used to close a file descriptor by the kernel. For most file systems, a program terminates access to a file in a filesystem using the close system call. This flushes file buffers, updates file metadata, which may include and end-of-file indicator in the data; de-allocates resources associated with the file (including the file descriptor) and updates the system wide table of files in use. Some programming languages maintain a data structure of files opened by their runtime library and may close when the program terminates. This practice is known as resource acquisition is initialization (RAII). Some operating systems will invoke the close on files held by a program if it terminates. Some operating systems will invoke the close syscall as part of an operating system recovery as a result of a system failure.

C library POSIX definition

The close call is standardized by the POSIX specification

int close  (int filedes);
int fclose (FILE *stream);

The function returns zero to indicate the file was closed successfully. If any error occurs, a value of -1 is returned and errno is appropriately set.

The errors that can occur include:

EBADF
The argument supplied was not a valid file descriptor
EINTR
The function call was interrupted by a signal
EIO
An I/O error occurred

References

External links

Zdroj:https://en.wikipedia.org?pojem=Close_(system_call)
>Text je dostupný pod licencí Creative Commons Uveďte autora – Zachovejte licenci, případně za dalších podmínek. Podrobnosti naleznete na stránce Podmínky užití.
Zdroj: Wikipedia.org - čítajte viac o Close (system call)





Text je dostupný za podmienok Creative Commons Attribution/Share-Alike License 3.0 Unported; prípadne za ďalších podmienok.
Podrobnejšie informácie nájdete na stránke Podmienky použitia.