位置:首頁 > 其他技術 > Unix/Linux係統調用 > inotify_init()函數 Unix/Linux

inotify_init()函數 Unix/Linux

inotify_init - 初始化一個inotify實例

內容簡介

#include <sys/inotify.h>

int inotify_init(void)

描述

inotify_init() 初始化一個新的inotify實例,並返回一個新的inotify的事件隊列相關的文件描述符。

返回值

On success, inotify_init() returns a new file descriptor, or -1 if an error occurred (in which case, errno is set appropriately).

錯誤

標簽 描述
EMFILE The user limit on the total number of inotify instances has been reached.
ENFILE The system limit on the total number of file descriptors has been reached.
ENOMEM Insufficient kernel memory is available.

曆史

Inotify was merged into the 2.6.13 Linux kernel.

遵循於

This system call is Linux specific.

另請參閱