mirror of https://github.com/ericonr/sndio.git
use sig_atomic_t in signals
This commit is contained in:
parent
5fdf55ede7
commit
b0d03532fc
|
@ -69,9 +69,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
int debug_level = 0;
|
volatile sig_atomic_t debug_level = 0;
|
||||||
#endif
|
#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,
|
* SIGINT handler, it raises the quit flag. If the flag is already set,
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
* 3 - structural changes (new aproc structures and files stream params changes)
|
* 3 - structural changes (new aproc structures and files stream params changes)
|
||||||
* 4 - data blocks and messages
|
* 4 - data blocks and messages
|
||||||
*/
|
*/
|
||||||
extern int debug_level;
|
extern volatile sig_atomic_t debug_level;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <sys/signal.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/signal.h>
|
||||||
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
Loading…
Reference in New Issue