use sig_atomic_t in signals

This commit is contained in:
Alexandre Ratchov 2011-04-28 00:41:43 +02:00
parent 5fdf55ede7
commit b0d03532fc
4 changed files with 5 additions and 3 deletions

View File

@ -69,9 +69,9 @@
#endif
#ifdef DEBUG
int debug_level = 0;
volatile sig_atomic_t debug_level = 0;
#endif
volatile int quit_flag = 0;
volatile sig_atomic_t quit_flag = 0;
/*
* SIGINT handler, it raises the quit flag. If the flag is already set,

View File

@ -27,7 +27,7 @@
* 3 - structural changes (new aproc structures and files stream params changes)
* 4 - data blocks and messages
*/
extern int debug_level;
extern volatile sig_atomic_t debug_level;
#endif
/*

View File

@ -16,6 +16,7 @@
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/signal.h>
#include <sys/stat.h>
#include <sys/un.h>

View File

@ -16,6 +16,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/signal.h>
#include <err.h>
#include <errno.h>