]> git.llucax.com Git - software/libev.git/commitdiff
save and restore errno in signal handler
authorroot <root>
Sat, 3 Nov 2007 12:19:31 +0000 (12:19 +0000)
committerroot <root>
Sat, 3 Nov 2007 12:19:31 +0000 (12:19 +0000)
ev.c

diff --git a/ev.c b/ev.c
index 7bed969f17e5c8331f8f8309e87ee227562fd998..20d0e3b2e16285cf9e7b31c0e4e189a9fc0d390b 100644 (file)
--- a/ev.c
+++ b/ev.c
@@ -415,8 +415,10 @@ sighandler (int signum)
 
   if (!gotsig)
     {
+      int old_errno = errno;
       gotsig = 1;
       write (sigpipe [1], &signum, 1);
+      errno = old_errno;
     }
 }