JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... \n"); fprintf(stderr, "-k message queue key (default is 1234)\n"); exit(EXIT_FAILURE); } static void send_msg(int qid, int msgtype) { struct msgbuf msg; time_t t; msg.mtype = msgtype; time(&t); snprintf(msg.mtext, sizeof(msg.mtext), "a message at %s", c ... == -1) { perror("msgsnd error"); exit(EXIT_FAILURE); } printf("sent: %s\n", msg.mtext); } static void get_msg(int qid, int msgtype) { struct msgbuf msg; if (msgrcv(qid, &msg, sizeof(msg.mtext), msgtype, MSG_NOERROR | IPC_NOWAIT) == -1) { if (errno != EN ... eived: %s\n", msg.mtext); } int main(int argc, char *argv[]) { int qid, opt; int mode = 0; /* 1 = send, 2 = receive */ int msgtype = 1; int msgkey = 1234; while ((opt = getopt(argc, argv, "srt:k:")) != -1) { switch (opt) { case 's': mode = 1; break; cas ... ... \n"); fprintf(stderr, "-k message queue key (default is 1234)\n"); exit(EXIT_FAILURE); } static void send_msg(int qid, int msgtype) { struct msgbuf msg; time_t t; msg.mtype = msgtype; time(&t); snprintf(msg.mtext, sizeof(msg.mtext), "a message at %s", c ... == -1) { perror("msgsnd error"); exit(EXIT_FAILURE); } printf("sent: %s\n", msg.mtext); } static void get_msg(int qid, int msgtype) { struct msgbuf msg; if (msgrcv(qid, &msg, sizeof(msg.mtext), msgtype, MSG_NOERROR | IPC_NOWAIT) == -1) { if (errno != EN ... eived: %s\n", msg.mtext); } int main(int argc, char *argv[]) { int qid, opt; int mode = 0; /* 1 = send, 2 = receive */ int msgtype = 1; int msgkey = 1234; while ((opt = getopt(argc, argv, "srt:k:")) != -1) { switch (opt) { case 's': mode = 1; break; cas ... ... \n"); fprintf(stderr, "-k message queue key (default is 1234)\n"); exit(EXIT_FAILURE); } static void send_msg(int qid, int msgtype) { struct msgbuf msg; time_t t; msg.mtype = msgtype; time(&t); snprintf(msg.mtext, sizeof(msg.mtext), "a message at %s", c ... == -1) { perror("msgsnd error"); exit(EXIT_FAILURE); } printf("sent: %s\n", msg.mtext); } static void get_msg(int qid, int msgtype) { struct msgbuf msg; if (msgrcv(qid, &msg, sizeof(msg.mtext), msgtype, MSG_NOERROR | IPC_NOWAIT) == -1) { if (errno != EN ... eived: %s\n", msg.mtext); } int main(int argc, char *argv[]) { int qid, opt; int mode = 0; /* 1 = send, 2 = receive */ int msgtype = 1; int msgkey = 1234; while ((opt = getopt(argc, argv, "srt:k:")) != -1) { switch (opt) { case 's': mode = 1; break; cas ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。