diff options
author | root <root> | 2007-11-03 12:19:31 +0000 |
---|---|---|
committer | root <root> | 2007-11-03 12:19:31 +0000 |
commit | 149ff7181e0f706d39af5f837a6da24fcfc50cbb (patch) | |
tree | bba4f0f1e159d2d945f5de4e66c55862e2704887 | |
parent | 1c33c678365888dfd0e9ba9271dc55d6093d490d (diff) |
save and restore errno in signal handler
-rw-r--r-- | ev.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -415,8 +415,10 @@ sighandler (int signum) if (!gotsig) { + int old_errno = errno; gotsig = 1; write (sigpipe [1], &signum, 1); + errno = old_errno; } } |