JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... irus scanning and hierarchical storage management. In the original fanotify API, only a limited set of events was supported. In particular, there was no support for create, delete, and move events. The support for those events was a ... dded in Linux 5.1. (See inotify (7) for details of an API that did notify those events pre Linux 5.1.) inotify (7) API と比較して追加されている機能としては、 マウントされたファイルシステムの全オブジェクトを監視 ... otify_init (2) が返した fanotify ファイルディスクリプターから ( read (2) などを使って) 読み出すことができる。 Two types of events are generated: notification events and permission events. Notification events are merely informative and require no action ... ... ター集合は、 fds 引数で指定する。 fds は、以下の型の構造体の配列である。 struct pollfd { int fd; /* file descriptor */ short events; /* requested events */ short revents; /* returned events */ }; nfds には、 fds 配列の要素数を指定する。 fd フィールドには ... 、オープンされたファイルのファイルディスクリプターが入る。 このフィールドが負の場合、対応する events フィールドは無視され、 revents には 0 が返される。(この機能により、一つの poll () の呼び出しで簡単にあるファイルディスクリ ... を反転するだけでよい。 ただし、この方法はファイルディスクリプター 0 を無視するのには使用できない点に注意すること。) 構造体の events 要素は入力パラメーターで、 ファイルディスクリプター fd に関して、 アプリケーションが興味を持っているイベントのビットマスク ... ... ター集合は、 fds 引数で指定する。 fds は、以下の型の構造体の配列である。 struct pollfd { int fd; /* file descriptor */ short events; /* requested events */ short revents; /* returned events */ }; nfds には、 fds 配列の要素数を指定する。 fd フィールドには ... 、オープンされたファイルのファイルディスクリプターが入る。 このフィールドが負の場合、対応する events フィールドは無視され、 revents には 0 が返される。(この機能により、一つの poll () の呼び出しで簡単にあるファイルディスクリ ... を反転するだけでよい。 ただし、この方法はファイルディスクリプター 0 を無視するのには使用できない点に注意すること。) 構造体の events 要素は入力パラメーターで、 ファイルディスクリプター fd に関して、 アプリケーションが興味を持っているイベントのビットマスク ... ... _event * events , int maxevents , int timeout ); int epoll_pwait(int epfd , struct epoll_event * events , int maxevents , int timeout , co ... nst sigset_t * sigmask ); 説明 The epoll_wait () system call waits for events on the epoll (7) instance referred to by the file descriptor epfd . The buffer pointed to by events is used to return info ... rmation from the ready list about file descriptors in the interest list that have some events available. Up to maxevents are returned by epoll_wait (). The maxevents argument must be greater than zero. The timeout ar ... ... _event * events , int maxevents , int timeout ); int epoll_pwait(int epfd , struct epoll_event * events , int maxevents , int timeout , co ... nst sigset_t * sigmask ); 説明 The epoll_wait () system call waits for events on the epoll (7) instance referred to by the file descriptor epfd . The buffer pointed to by events is used to return info ... rmation from the ready list about file descriptors in the interest list that have some events available. Up to maxevents are returned by epoll_wait (). The maxevents argument must be greater than zero. The timeout ar ... ... athname will be marked. All directories, subdirectories, and the contained files of the mount point will be monitored. The events which require that filesystem objects are identified by file handles, such as FAN_CREATE , FAN_ATTRIB , FAN_MOVE , and FAN ... ァイルディスクリプターが FAN_CLASS_PRE_CONTENT か FAN_CLASS_CONTENT を指定されて作成されている必要がある。 FAN_ONDIR Create events for directories---for example, when opendir (3), readdir (3) (but see BUGS), and closedir (3) are called. Without this fla ... g, events are created only for files. In the context of directory entry events, such as FAN_CREATE , FAN_DELETE , FAN_MOVED_FROM , a ... ... ィレクトリ内のオブジェクトに対してのみ発生する (ディレクトリ自身に対しては発生しない)。 Note : when monitoring a directory, events are not generated for the files inside the directory when the events are performed via a pathname (i.e., a link) that lies ... に対してイベントが発生した場合、 inotify_event 構造体で返される name フィールドは、ディレクトリ内のファイル名を表す。 IN_ALL_EVENTS マクロは上記のイベント全てのマスクとして定義される。 このマクロは inotify_add_watch (2) を呼び出すときの mask 引数として使 ... なくなる。 IN_MASK_ADD If a watch instance already exists for the filesystem object corresponding to pathname , add (OR) the events in mask to the watch mask (instead of replacing the mask); the error EINVAL results if IN_MASK_CREATE is also specified. I ... ... y_event_metadata supplied to read (2) (see fanotify (7)). FAN_REPORT_FID (Linux 5.1 以降) This value allows the receipt of events which contain additional information about the underlying filesystem object correlated to an event. An additional record o ... ay be used for applications monitoring a directory or a filesystem that are interested in the directory entry modification events FAN_CREATE , FAN_DELETE , and FAN_MOVE , or in events such as FAN_ATTRIB , FAN_DELETE_SELF , and FAN_MOVE_SELF . All the e ... quire an fanotify group that identifies filesystem objects by file handles. Note that for the directory entry modification events the reported file handle identifies the modified directory and not the created/deleted/moved child object. The use of FAN_ ... ... registered via epoll_ctl (2), which adds items to the interest list of the epoll instance. • epoll_wait (2) waits for I/O events, blocking the calling thread if no events are currently available. (This system call can be thought of as fetching items f ... を起こしたままにしておくには、 epoll_ctl (2) EPOLLWAKEUP フラグを使う必要がある。 EPOLLWAKEUP フラグが struct epoll_event の events フィールドでセットされた場合、 イベントがキューに入った瞬間から、 epoll_wait (2) がそのイベントを返し次の epoll_wait (2) の ... 、次の do_use_fd() 呼び出しのときに、以前に停止したところから read (2) または write (2) を継続することができる。 #define MAX_EVENTS 10 struct epoll_event ev, events[MAX_EVENTS]; int listen_sock, conn_sock, nfds, epollfd; /* Code to set up listening socke ... ... struct timespec' の定義 */ int io_getevents(aio_context_t ctx_id , long min_nr , long nr , struct io_event * events , struct timespec * timeout ); 注 : このシステムコ ... ースについて説明している。 libaio で提供されるラッパー関数では ctx_id 引数に違う型が使われている。「注意」を参照。 The io_getevents () system call attempts to read at least min_nr events and up to nr events from the completion queue of the AIO context sp ... ecified by ctx_id . The timeout argument specifies the amount of time to wait for events, and is specified as a relative timeout in a structure of the following form: struct timespec { time_t tv_sec; /* seconds ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。