mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-20 23:04:18 +02:00
Properly initialize sigaction struct.
The sigaction struct used in signal_thread was stored in an automatic variable. The fields which were not set manually had undefined values.
This commit is contained in:
parent
701074fd96
commit
1990e8e25d
1 changed files with 4 additions and 1 deletions
5
signal.c
5
signal.c
|
|
@ -25,6 +25,9 @@
|
|||
|
||||
#include "espeakup.h"
|
||||
|
||||
/* A struct sigaction with all values set to zero. */
|
||||
static struct sigaction OUR_SIGACTION_INITIALIZER;
|
||||
|
||||
/*
|
||||
* We install a dummy signal handler to let the o/s know that we
|
||||
* do not want the default action to be performed since we are
|
||||
|
|
@ -36,7 +39,7 @@ static void dummy_handler(int sig)
|
|||
|
||||
void *signal_thread(void *arg)
|
||||
{
|
||||
struct sigaction temp;
|
||||
struct sigaction temp = OUR_SIGACTION_INITIALIZER;
|
||||
sigset_t sigset;
|
||||
int sig;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue