Signal handlers require signo to be public

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-10-30 11:20:36 +01:00
parent e5bc49a8e6
commit 7e38c11b87
3 changed files with 3 additions and 7 deletions
-5
View File
@@ -68,11 +68,6 @@ struct uev;
int timeout; \
int period; \
} t; \
\
/* Signal watchers */ \
struct { \
int signo; \
} s; \
} u; \
\
/* Watcher type */ \
+2 -2
View File
@@ -87,7 +87,7 @@ int uev_signal_set(uev_t *w, int signo)
}
/* Remember for callbacks and start/stop */
w->u.s.signo = signo;
w->signo = signo;
/* Handle stopped signal watchers */
if (w->fd < 0) {
@@ -129,7 +129,7 @@ int uev_signal_start(uev_t *w)
if (-1 != w->fd)
uev_signal_stop(w);
return uev_signal_set(w, w->u.s.signo);
return uev_signal_set(w, w->signo);
}
/**
+1
View File
@@ -46,6 +46,7 @@ typedef struct uev {
uev_private_t type;
/* Public data for users to reference */
int signo;
int fd;
uev_ctx_t *ctx;
} uev_t;