From 149ff7181e0f706d39af5f837a6da24fcfc50cbb Mon Sep 17 00:00:00 2001 From: root Date: Sat, 3 Nov 2007 12:19:31 +0000 Subject: [PATCH 1/1] save and restore errno in signal handler --- ev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ev.c b/ev.c index 7bed969..20d0e3b 100644 --- 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; } } -- 2.43.0