summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2008-02-19 19:13:50 +0000
committerroot <root>2008-02-19 19:13:50 +0000
commitd18db5d76a04a516a7ae0694522d3f6a46772f3b (patch)
tree76112a6b0b92131e06b676221e5f8711d17c10a0
parent0c8e14659f11acebbf5d102234a3d9d0e94b00a3 (diff)
async events might shadow signal events and vice versa, fixed
-rw-r--r--ev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ev.c b/ev.c
index 6d5f18a..2b3d476 100644
--- a/ev.c
+++ b/ev.c
@@ -819,15 +819,15 @@ evpipe_init (EV_P)
void inline_size
evpipe_write (EV_P_ int sig, int async)
{
- if (!(gotasync || gotsig))
- {
- int old_errno = errno; /* save errno becaue write might clobber it */
+ int sent = gotasync || gotsig;
- if (sig) gotsig = 1;
- if (async) gotasync = 1;
+ if (sig) gotsig = 1;
+ if (async) gotasync = 1;
+ if (!sent)
+ {
+ int old_errno = errno; /* save errno becaue write might clobber it */
write (evpipe [1], &old_errno, 1);
-
errno = old_errno;
}
}