JM Project

JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。

Linux マニュアル 一覧

全文・高度検索

per page, with , order by , clip by
Results of 1 - 10 of about 31 for errExit (0.004 sec.)
Man page of SHM_OPEN 11469
SHM_OPEN Section: Linux Programmer's Manual (3) Updated: 2020-11-01 Index JM Home Page 名前 shm_open, shm_unlink - POSIX 共有メモリーオブジェクトの作成/オープン/削除を行う 書式 #include < sys/mman.h > #include < sys/stat.h > /* mode 定数用 ... #include < semaphore.h > #include < sys/stat.h > #include < stdio.h > #include < stdlib.h > #include < unistd.h > #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) #define BUF_SIZE 1024 /* Maximum size for exchanged string */ /* ... ze to the size of our structure */ int fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); if (fd == -1) errExit("shm_open"); if (ftruncate(fd, sizeof(struct shmbuf)) == -1) errExit("ftruncate"); /* Map the object into the caller's add ... ace */ struct shmbuf *shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) errExit("mmap"); /* Initialize semaphores as process-shared, with value 0 */ if (sem_init(&shmp->sem1, 1, 0) == -1) errExit("sem_i ...
https://man.mtool.work/man/20260915/man3/shm_open.3.html
Man page of SHM_OPEN 11469
SHM_OPEN Section: Linux Programmer's Manual (3) Updated: 2020-11-01 Index JM Home Page 名前 shm_open, shm_unlink - POSIX 共有メモリーオブジェクトの作成/オープン/削除を行う 書式 #include < sys/mman.h > #include < sys/stat.h > /* mode 定数用 ... #include < semaphore.h > #include < sys/stat.h > #include < stdio.h > #include < stdlib.h > #include < unistd.h > #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) #define BUF_SIZE 1024 /* Maximum size for exchanged string */ /* ... ze to the size of our structure */ int fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); if (fd == -1) errExit("shm_open"); if (ftruncate(fd, sizeof(struct shmbuf)) == -1) errExit("ftruncate"); /* Map the object into the caller's add ... ace */ struct shmbuf *shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) errExit("mmap"); /* Initialize semaphores as process-shared, with value 0 */ if (sem_init(&shmp->sem1, 1, 0) == -1) errExit("sem_i ...
https://man.mtool.work/man/20260915/man3/shm_unlink.3.html
Man page of SHMOP 10677
SHMOP Section: Linux Programmer's Manual (2) Updated: 2020-04-11 Index JM Home Page 名前 shmat, shmdt - System V 共有メモリー (shared memory) の操作 書式 #include < sys/types.h > #include < sys/shm.h > void *shmat(int shmid , const void * s ... h > #include < sys/shm.h > #include < sys/sem.h > #include < stdio.h > #include < stdlib.h > #include < string.h > #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) union semun { /* Used in calls to semctl() */ int val; struct sem ... ry and semaphore set containing one semaphore */ shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600); if (shmid == -1) errExit("shmget"); semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600); if (shmid == -1) errExit("shmget"); /* Attach shared memory i ... nto our address space */ addr = shmat(shmid, NULL, SHM_RDONLY); if (addr == (void *) -1) errExit("shmat"); /* Initialize semaphore 0 in set with value 1 */ arg.val = 1; if (semctl(semid, 0, SETVAL, arg) == -1) errExit(" ...
https://man.mtool.work/man/20260915/man2/shmat.2.html
Man page of SHMOP 10677
SHMOP Section: Linux Programmer's Manual (2) Updated: 2020-04-11 Index JM Home Page 名前 shmat, shmdt - System V 共有メモリー (shared memory) の操作 書式 #include < sys/types.h > #include < sys/shm.h > void *shmat(int shmid , const void * s ... h > #include < sys/shm.h > #include < sys/sem.h > #include < stdio.h > #include < stdlib.h > #include < string.h > #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) union semun { /* Used in calls to semctl() */ int val; struct sem ... ry and semaphore set containing one semaphore */ shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600); if (shmid == -1) errExit("shmget"); semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600); if (shmid == -1) errExit("shmget"); /* Attach shared memory i ... nto our address space */ addr = shmat(shmid, NULL, SHM_RDONLY); if (addr == (void *) -1) errExit("shmat"); /* Initialize semaphore 0 in set with value 1 */ arg.val = 1; if (semctl(semid, 0, SETVAL, arg) == -1) errExit(" ...
https://man.mtool.work/man/20260915/man2/shmdt.2.html
Man page of SHMOP 10677
SHMOP Section: Linux Programmer's Manual (2) Updated: 2020-04-11 Index JM Home Page 名前 shmat, shmdt - System V 共有メモリー (shared memory) の操作 書式 #include < sys/types.h > #include < sys/shm.h > void *shmat(int shmid , const void * s ... h > #include < sys/shm.h > #include < sys/sem.h > #include < stdio.h > #include < stdlib.h > #include < string.h > #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) union semun { /* Used in calls to semctl() */ int val; struct sem ... ry and semaphore set containing one semaphore */ shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600); if (shmid == -1) errExit("shmget"); semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600); if (shmid == -1) errExit("shmget"); /* Attach shared memory i ... nto our address space */ addr = shmat(shmid, NULL, SHM_RDONLY); if (addr == (void *) -1) errExit("shmat"); /* Initialize semaphore 0 in set with value 1 */ arg.val = 1; if (semctl(semid, 0, SETVAL, arg) == -1) errExit(" ...
https://man.mtool.work/man/20260915/man2/shmop.2.html
Man page of AIO 9479
AIO Section: Linux Programmer's Manual (7) Updated: 2020-08-13 Index JM Home Page 名前 aio - POSIX 非同期 I/O の概要 説明 POSIX 非同期 (AIO) インターフェースを使うと、アプリケーションは、非同期 に (つまり、バックグラウンドで) 実行されるI/O ... < errno.h > #include < aio.h > #include < signal.h > #define BUF_SIZE 20 /* Size of buffers for read operations */ #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0) struct ioRequest { /* Application-defined structure for tracking I/ ... eqs = argc - 1; /* Allocate our arrays */ struct ioRequest *ioList = calloc(numReqs, sizeof(*ioList)); if (ioList == NULL) errExit("calloc"); struct aiocb *aiocbList = calloc(numReqs, sizeof(*aiocbList)); if (aiocbList == NULL) errExit("calloc"); /* Est ... sa.sa_flags = SA_RESTART; sigemptyset(&sa.sa_mask); sa.sa_handler = quitHandler; if (sigaction(SIGQUIT, &sa, NULL) == -1) errExit("sigaction"); sa.sa_flags = SA_RESTART | SA_SIGINFO; sa.sa_sigaction = aioSigHandler; if (sigaction(IO_SIGNAL, &sa, NULL) ...
https://man.mtool.work/man/20260915/man7/aio.7.html
Man page of OPEN_BY_HANDLE_AT 9350
OPEN_BY_HANDLE_AT Section: Linux Programmer's Manual (2) Updated: 2020-11-01 Index JM Home Page 名前 name_to_handle_at, open_by_handle_at - パス名に対するハンドルの取得とハンドルによるファイルのオープン 書式 #define _GNU_SOURCE /* feature_t ... tl.h > #include < stdio.h > #include < stdlib.h > #include < unistd.h > #include < errno.h > #include < string.h > #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) int main(int argc, char *argv[]) { struct file_handle *fhp; int m ... E); } pathname = argv[1]; /* file_handle 構造体を確保する */ fhsize = sizeof(*fhp); fhp = malloc(fhsize); if (fhp == NULL) errExit("malloc"); /* name_to_handle_at() を最初に呼び出して ファイルハンドルに必要なサイズを入手する */ dirfd = AT_FDCWD; /* For ... */ fhsize = sizeof(*fhp) + fhp->handle_bytes; fhp = realloc(fhp, fhsize); /* Copies fhp->handle_bytes */ if (fhp == NULL) errExit("realloc"); /* コマンドラインで指定されたパス名からファイルハンドルを取得 */ if (name_to_handle_at(dirfd, pathname, fhp, & ...
https://man.mtool.work/man/20260915/man2/name_to_handle_at.2.html
Man page of OPEN_BY_HANDLE_AT 9350
OPEN_BY_HANDLE_AT Section: Linux Programmer's Manual (2) Updated: 2020-11-01 Index JM Home Page 名前 name_to_handle_at, open_by_handle_at - パス名に対するハンドルの取得とハンドルによるファイルのオープン 書式 #define _GNU_SOURCE /* feature_t ... tl.h > #include < stdio.h > #include < stdlib.h > #include < unistd.h > #include < errno.h > #include < string.h > #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) int main(int argc, char *argv[]) { struct file_handle *fhp; int m ... E); } pathname = argv[1]; /* file_handle 構造体を確保する */ fhsize = sizeof(*fhp); fhp = malloc(fhsize); if (fhp == NULL) errExit("malloc"); /* name_to_handle_at() を最初に呼び出して ファイルハンドルに必要なサイズを入手する */ dirfd = AT_FDCWD; /* For ... */ fhsize = sizeof(*fhp) + fhp->handle_bytes; fhp = realloc(fhp, fhsize); /* Copies fhp->handle_bytes */ if (fhp == NULL) errExit("realloc"); /* コマンドラインで指定されたパス名からファイルハンドルを取得 */ if (name_to_handle_at(dirfd, pathname, fhp, & ...
https://man.mtool.work/man/20260915/man2/open_by_handle_at.2.html
Man page of MALLOC_INFO 8816
MALLOC_INFO Section: Linux Programmer's Manual (3) Updated: 2020-11-01 Index JM Home Page 名前 malloc_info - malloc の状態をストリームに出力する 書式 #include < malloc.h > int malloc_info(int options , FILE * stream ); 説明 malloc_info () 関 ... pthread.h > #include < malloc.h > #include < errno.h > static size_t blockSize; static int numThreads, numBlocks; #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) static void * thread_func(void *arg) { int tn = (int) arg; /* The ... d) allocates a different amount of memory */ for (int j = 0; j < numBlocks; j++) if (malloc(blockSize * (2 + tn)) == NULL) errExit("malloc-thread"); sleep(100); /* Sleep until main thread terminates */ return NULL; } int main(int argc, char *argv[]) { i ... (argv[3]); sleepTime = (argc > 4) ? atoi(argv[4]) : 0; pthread_t *thr = calloc(numThreads, sizeof(*thr)); if (thr == NULL) errExit("calloc"); printf("============ Before allocating blocks ============\n"); malloc_info(0, stdout); /* Create threads that ...
https://man.mtool.work/man/20260915/man3/malloc_info.3.html
Man page of MEMFD_CREATE 8557
MEMFD_CREATE Section: Linux Programmer's Manual (2) Updated: 2020-11-01 Index JM Home Page 名前 memfd_create - 無名ファイル (anonymous file) を作成する 書式 #define _GNU_SOURCE /* feature_test_macros (7) 参照 */ #include < sys/mman.h > int ... an.h > #include < fcntl.h > #include < stdlib.h > #include < unistd.h > #include < string.h > #include < stdio.h > #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) int main(int argc, char *argv[]) { int fd; unsigned int seals; ch ... anonymous file in tmpfs; allow seals to be placed on the file */ fd = memfd_create(name, MFD_ALLOW_SEALING); if (fd == -1) errExit("memfd_create"); /* Size the file as specified on the command line */ if (ftruncate(fd, len) == -1) errExit("truncate"); p ... |= F_SEAL_FUTURE_WRITE; if (strchr(seals_arg, 'S') != NULL) seals |= F_SEAL_SEAL; if (fcntl(fd, F_ADD_SEALS, seals) == -1) errExit("fcntl"); } /* Keep running, so that the file created by memfd_create() continues to exist */ pause(); exit(EXIT_SUCCESS); ...
https://man.mtool.work/man/20260915/man2/memfd_create.2.html
PREV 1 2 3 4 NEXT

リンク

日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。