JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... ファイルやディレクトリがオープンされた際にイベントを作成する。 FAN_OPEN_EXEC (Linux 5.0 以降) Create an event when a file is opened with the intent to be executed. See NOTES for additional details. FAN_ATTRIB (Linux 5.1 以降) Create an event when the met ... mask に指定されたか、 fanotify_fd が fanotify ファイルディスクリプターでなかった。 EINVAL The fanotify file descriptor was opened with FAN_CLASS_NOTIF or the fanotify group identifies filesystem objects by file handles and mask contains a flag for perm ... ecution of a program occurs. More specifically, this means that events of these types will be generated for files that are opened using execve (2), execveat (2), or uselib (2). Events of these types will not be raised in the situation where an interpre ... ... h > ssize_t vmsplice(int fd , const struct iovec * iov , unsigned long nr_segs , unsigned int flags ); 説明 If fd is opened for writing, the vmsplice () system call maps nr_segs ranges of user memory described by iov into a pipe. If fd is opened ... ... では、標準入力に対して 2 つのリクエストを行い、 "abc" と "x" という 2 行の入力を行っている。 $ ./a.out /dev/stdin /dev/stdin opened /dev/stdin on descriptor 3 opened /dev/stdin on descriptor 4 aio_error(): for request 0 (descriptor 3): In progress for re ... List[j].aiocbp->aio_fildes = open(argv[j + 1], O_RDONLY); if (ioList[j].aiocbp->aio_fildes == -1) errExit("open"); printf("opened %s on descriptor %d\n", argv[j + 1], ioList[j].aiocbp->aio_fildes); ioList[j].aiocbp->aio_buf = malloc(BUF_SIZE); if (ioLi ... ... Linux 2.2), the kernel normally sets the correct ownership and permissions for the pseudoterminal slave when the master is opened ( posix_openpt (3)), so that nothing must be done by grantpt (). Thus, no such helper binary is required (and indeed it is ... ... , and close the FIFO: $ echo aaaaabbbbbccccc > myfifo In the terminal where we are running the program, we would then see: Opened "myfifo" on fd 3 About to poll() Ready: 1 fd=3; events: POLLIN POLLHUP read 10 bytes: aaaaabbbbb About to poll() Ready: 1 ... for (int j = 0; j < nfds; j++) { pfds[j].fd = open(argv[j + 1], O_RDONLY); if (pfds[j].fd == -1) errExit("open"); printf("Opened \"%s\" on fd %d\n", argv[j + 1], pfds[j].fd); pfds[j].events = POLLIN; } /* Keep calling poll() as long as at least one fi ... ... , and close the FIFO: $ echo aaaaabbbbbccccc > myfifo In the terminal where we are running the program, we would then see: Opened "myfifo" on fd 3 About to poll() Ready: 1 fd=3; events: POLLIN POLLHUP read 10 bytes: aaaaabbbbb About to poll() Ready: 1 ... for (int j = 0; j < nfds; j++) { pfds[j].fd = open(argv[j + 1], O_RDONLY); if (pfds[j].fd == -1) errExit("open"); printf("Opened \"%s\" on fd %d\n", argv[j + 1], pfds[j].fd); pfds[j].events = POLLIN; } /* Keep calling poll() as long as at least one fi ... ... e size increases by another thread or process could result in a file whose size is smaller than expected. * If fd has been opened with the O_APPEND or O_WRONLY flags, the function fails with the error EBADF . In general, the emulation is not MT-safe. O ... ... れるメッセージキュー記述で O_NONBLOCK フラグがセットされていた。 EBADF The descriptor specified in mqdes was invalid or not opened for reading. EINTR 関数呼び出しがシグナルハンドラーにより中断された。 signal (7) 参照。 EINVAL 関数呼び出しは停止するはずで ... ... れるメッセージキュー記述で O_NONBLOCK フラグがセットされていた。 EBADF The descriptor specified in mqdes was invalid or not opened for writing. EINTR 関数呼び出しがシグナルハンドラーにより中断された。 signal (7) 参照。 EINVAL 関数呼び出しは停止するはずで ... ... he file to be executed is specified via a file descriptor, fd , rather than via a pathname. The file descriptor fd must be opened read-only ( O_RDONLY ) or with the O_PATH flag and the caller must have permission to execute the file that it refers to. ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。