summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2008-02-09 00:34:11 +0000
committerroot <root>2008-02-09 00:34:11 +0000
commit014a3ba283e895a632c27eb2e966576fbc27461a (patch)
tree05fd02d463301c043e181dcc50ecfec118db82cd /ev.c
parentbee0323ee42a59ad3d8494412b081ea09d10319e (diff)
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ev.c b/ev.c
index 3ab0517..a780297 100644
--- a/ev.c
+++ b/ev.c
@@ -812,7 +812,7 @@ evpipe_init (EV_P)
ev_io_set (&pipeev, evpipe [0], EV_READ);
ev_io_start (EV_A_ &pipeev);
- ev_unref (EV_A); /* child watcher should not keep loop alive */
+ ev_unref (EV_A); /* watcher should not keep loop alive */
}
}
@@ -821,12 +821,13 @@ evpipe_write (EV_P_ int sig, int async)
{
if (!(gotasync || gotsig))
{
- int old_errno = errno;
+ int old_errno = errno; /* save errno becaue write might clobber it */
if (sig) gotsig = 1;
if (async) gotasync = 1;
write (evpipe [1], &old_errno, 1);
+
errno = old_errno;
}
}