| 総合手引 | セクション 2 | English | Deutsch | オプション |
#include <machine/param.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
新しく作成された IPC オブジェクトのモードは、 flag 引数に渡す以下の定数の論理和 ( OR) で決まります:
| SHM_R | ユーザ用の読取りアクセス |
| SHM_W | ユーザ用の書込みアクセス |
| ( SHM_R>>3) | |
| グループ用の読取りアクセス | |
| ( SHM_W>>3) | |
| グループ用の書込みアクセス | |
| ( SHM_R>>6) | |
| その他用の読取りアクセス | |
| ( SHM_W>>6) | |
| その他用の書込みアクセス | |
新しい共有メモリセグメントを作成する場合、 size は、新しいセグメントのバイト単位のサイズを表わします。 セグメントのサイズは、カーネルに便利なようにある倍数に 切り上げられることがあります (すなわちページサイズ)。
| [EINVAL] | |
| 指定したサイズが、既存セグメントのサイズより大きいです。 指定したサイズが、システムの最低値より小さいか、最大値より大きいです。 | |
| [ENOENT] | |
| key と一致する共有メモリセグメントがなく、IPC_CREAT が指定されていません。 | |
| [ENOSPC] | |
| 要求を満たす十分なメモリを、カーネルが割り当てられません。 | |
| [EEXIST] | |
| IPC_CREAT と IPC_EXCL が指定され、 key に対応する共有メモリセグメントがすでに存在します。 | |
| SHMGET (2) | July 3, 1995 |
| 総合手引 | セクション 2 | English | Deutsch | オプション |
このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.
| “ | Our grievance is not just against Unix itself, but against the cult of Unix zealots who defend and nurture it. They take the heat, disease, and pestilence as givens, and, as ancient shamans did, display their wounds, some self-inflicted, as proof of their power and wizardry. We aim, through bluntness and humor, to show them that they pray to a tin god, and that science, not religion, is the path to useful and friendly technology. | ” |
| — The Unix Haters' handbook | ||