X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=original%2Fman3%2Fmq_notify.3;h=483b570bf26177f97631ec30c4599ca382216dd5;hb=110dba020f489b75aff2497105f7970c05e2b87c;hp=11a711f0ddedab6f19dd8091f39a3ba8db7e2f4b;hpb=504d22d4a96ccb4837812eca7e370714a5ed57f3;p=linuxjm%2FLDP_man-pages.git diff --git a/original/man3/mq_notify.3 b/original/man3/mq_notify.3 index 11a711f0..483b570b 100644 --- a/original/man3/mq_notify.3 +++ b/original/man3/mq_notify.3 @@ -23,7 +23,7 @@ .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" -.TH MQ_NOTIFY 3 2010-10-04 "Linux" "Linux Programmer's Manual" +.TH MQ_NOTIFY 3 2014-04-06 "Linux" "Linux Programmer's Manual" .SH NAME mq_notify \- register for notification when a message is available .SH SYNOPSIS @@ -51,7 +51,7 @@ For the definition and general details of this structure, see .PP If .I sevp -is a non-NULL pointer, then +is a non-null pointer, then .BR mq_notify () registers the calling process to receive message notification. The @@ -179,8 +179,8 @@ message queue named in its command-line argument. Notification is performed by creating a thread. The thread executes a function which reads one message from the queue and then terminates the process. +.SS Program source .nf - #include #include #include @@ -210,7 +210,7 @@ tfunc(union sigval sv) if (nr == \-1) handle_error("mq_receive"); - printf("Read %ld bytes from MQ\\n", (long) nr); + printf("Read %zd bytes from MQ\\n", nr); free(buf); exit(EXIT_SUCCESS); /* Terminate the process */ } @@ -222,8 +222,8 @@ main(int argc, char *argv[]) struct sigevent sev; if (argc != 2) { - fprintf(stderr, "Usage: %s \\n", argv[0]); - exit(EXIT_FAILURE); + fprintf(stderr, "Usage: %s \\n", argv[0]); + exit(EXIT_FAILURE); } mqdes = mq_open(argv[1], O_RDONLY); @@ -249,3 +249,12 @@ main(int argc, char *argv[]) .BR mq_unlink (3), .BR mq_overview (7), .BR sigevent (7) +.SH COLOPHON +This page is part of release 3.68 of the Linux +.I man-pages +project. +A description of the project, +information about reporting bugs, +and the latest version of this page, +can be found at +\%http://www.kernel.org/doc/man\-pages/.