File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 99
1010#define _XOPEN_SOURCE 700
1111
12- #include <sys/types.h>
13- #include <sys/wait.h>
14- #include <sys/ipc.h>
15- #include <sys/stat.h>
16- #include <sys/sem.h>
17- #include <sys/mman.h>
1812#include <stdio.h>
13+ #include <stdbool.h>
1914#include <stdlib.h>
2015#include <fcntl.h>
2116#include <unistd.h>
2217#include <string.h>
2318#include <signal.h>
2419#include <errno.h>
2520#include <err.h>
21+ #include <sys/types.h>
22+ #include <sys/wait.h>
23+ #include <sys/ipc.h>
24+ #include <sys/stat.h>
25+ #include <sys/sem.h>
26+ #include <sys/mman.h>
2627
2728unsigned long i ; /* number of loops per process */
2829 /* u_long should be enough for basic demo */
@@ -75,13 +76,13 @@ main(int argc, char **argv)
7576{
7677 key_t key ;
7778 char c = 0 ;
78- int dbg = 0 ;
79+ bool dbg = false ;
7980 struct sigaction act ;
8081
8182 if (argc == 1 )
8283 printf ("run with any argument to see some debug info\n" );
8384 else
84- dbg = 1 ;
85+ dbg = true ;
8586
8687 /* get a semaphore */
8788 key = ftok ("/etc/passwd" , 0 );
You can’t perform that action at this time.
0 commit comments