JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... anotify (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 of type FAN_EVENT_INFO_TYPE_FID encapsulates ... the information about the object and is included alongside the generic event metadata structure. The file descriptor that is used to represent t ... 5.9 以降) Events for fanotify groups initialized with this flag will contain (see exceptions below) additional information about a directory object correlated to an event. An additional record of type FAN_EVENT_INFO_TYPE_DFID encapsulates the informat ... ... t (3) を使って加算する。 2番目の引数には、 sem_timedwait () に渡すタイムアウトまでの時間を秒単位で指定する。 $ ./a.out 2 3 About to call sem_timedwait() sem_post() from handler sem_timedwait() succeeded $ ./a.out 2 1 About to call sem_timedwait() sem_ ... */ if (clock_gettime(CLOCK_REALTIME, &ts) == -1) handle_error("clock_gettime"); ts.tv_sec += atoi(argv[2]); printf("main() about to call sem_timedwait()\n"); while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR) continue; /* Restart if interr ... ... t (3) を使って加算する。 2番目の引数には、 sem_timedwait () に渡すタイムアウトまでの時間を秒単位で指定する。 $ ./a.out 2 3 About to call sem_timedwait() sem_post() from handler sem_timedwait() succeeded $ ./a.out 2 1 About to call sem_timedwait() sem_ ... */ if (clock_gettime(CLOCK_REALTIME, &ts) == -1) handle_error("clock_gettime"); ts.tv_sec += atoi(argv[2]); printf("main() about to call sem_timedwait()\n"); while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR) continue; /* Restart if interr ... ... t (3) を使って加算する。 2番目の引数には、 sem_timedwait () に渡すタイムアウトまでの時間を秒単位で指定する。 $ ./a.out 2 3 About to call sem_timedwait() sem_post() from handler sem_timedwait() succeeded $ ./a.out 2 1 About to call sem_timedwait() sem_ ... */ if (clock_gettime(CLOCK_REALTIME, &ts) == -1) handle_error("clock_gettime"); ts.tv_sec += atoi(argv[2]); printf("main() about to call sem_timedwait()\n"); while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR) continue; /* Restart if interr ... ... 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 fd=3; events: POLLIN PO ... LLHUP read 6 bytes: ccccc About to poll() Ready: 1 fd=3; events: POLLHUP closing fd 3 All file descriptors closed; bye In the above output, we see that po ... } /* Keep calling poll() as long as at least one file descriptor is open */ while (num_open_fds > 0) { int ready; printf("About to poll()\n"); ready = poll(pfds, nfds, -1); if (ready == -1) errExit("poll"); printf("Ready: %d\n", ready); /* Deal with ... ... 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 fd=3; events: POLLIN PO ... LLHUP read 6 bytes: ccccc About to poll() Ready: 1 fd=3; events: POLLHUP closing fd 3 All file descriptors closed; bye In the above output, we see that po ... } /* Keep calling poll() as long as at least one file descriptor is open */ while (num_open_fds > 0) { int ready; printf("About to poll()\n"); ready = poll(pfds, nfds, -1); if (ready == -1) errExit("poll"); printf("Ready: %d\n", ready); /* Deal with ... ... 警告メッセージをすべて表示しません。 error 警告をエラーとして扱います。 見つかった場合に自動的に提供されるファイル (常時)。 ABOUT-GNU TODO install-sh mdate-sh ABOUT-NLS ar-lib libversion.in missing BACKLOG compile ltcf-c.sh mkinstalldirs COPYING config ... ... 警告メッセージをすべて表示しません。 error 警告をエラーとして扱います。 見つかった場合に自動的に提供されるファイル (常時)。 ABOUT-GNU TODO install-sh mdate-sh ABOUT-NLS ar-lib libversion.in missing BACKLOG compile ltcf-c.sh mkinstalldirs COPYING config ... ... の実行例である。 $ ./a.out thread_func(): started; cancellation disabled main(): sending cancellation request thread_func(): about to enable cancellation main(): thread was canceled プログラムのソース #include < pthread.h > #include < stdio.h > #include ... s, "pthread_setcancelstate"); printf("thread_func(): started; cancellation disabled\n"); sleep (5); printf("thread_func(): about to enable cancellation\n"); s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); if (s != 0) handle_error_en(s, "pthre ... ... is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. 関連項目 texindex に関する全般的な説明は、Texinfo マニュアルとして管理されてい ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。