summaryrefslogtreecommitdiff
path: root/manual/examples
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1992-10-19 23:56:43 +0000
committerRoland McGrath <roland@gnu.org>1992-10-19 23:56:43 +0000
commit5d124dc4f008682b5885e01ddcadeab41c7f2b66 (patch)
tree0b1ea5b3f59a319e681dd273008bac8441eaae14 /manual/examples
parent77b94d776c2700f21953625c38418a1df1181325 (diff)
Add @group...@end group where needed.
Diffstat (limited to 'manual/examples')
-rw-r--r--manual/examples/sigusr.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/manual/examples/sigusr.c b/manual/examples/sigusr.c
index 59e7320235..11e3ceee8f 100644
--- a/manual/examples/sigusr.c
+++ b/manual/examples/sigusr.c
@@ -1,10 +1,11 @@
+/*@group*/
#include <signal.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
+/*@end group*/
/* When a @code{SIGUSR1} signal arrives, set this variable. */
-
volatile sig_atomic_t usr_interrupt = 0;
void
@@ -13,9 +14,7 @@ synch_signal (int sig)
usr_interrupt = 1;
}
-
/* The child process executes this function. */
-
void
child_function (void)
{
@@ -26,11 +25,10 @@ child_function (void)
kill (getppid (), SIGUSR1);
/* Continue with execution. */
- printf ("Bye, now....\n");
+ puts ("Bye, now....");
exit (0);
}
-
int
main (void)
{
@@ -48,13 +46,16 @@ main (void)
/* Create the child process. */
child_id = fork ();
if (child_id == 0)
- child_function (); /* Does not return */
+ child_function (); /* Does not return. */
- /* Busy wait for child to send a signal. */
+/*@group*/
+ /* Busy wait for the child to send a signal. */
while (!usr_interrupt)
;
+/*@end group*/
/* Now continue execution. */
- printf ("That's all, folks!\n");
+ puts ("That's all, folks!");
+
return 0;
}