git.samba.org
/
obnox
/
samba-ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
017586b
)
s3:lib/select: don't overwrite errno in the signal handler
author
Stefan Metzmacher
<metze@samba.org>
Sun, 20 Sep 2009 21:29:34 +0000
(23:29 +0200)
committer
Karolin Seeger
<kseeger@samba.org>
Thu, 8 Oct 2009 07:39:44 +0000
(09:39 +0200)
metze
(cherry picked from commit
00e378f17c39c52689601bc622b9cd78a0cdce12
)
source3/lib/select.c
patch
|
blob
|
history
diff --git
a/source3/lib/select.c
b/source3/lib/select.c
index a58530af8d343eebe72ac484ce94e61a812999b1..b5443ff20ca3c7ebdb201d77616ca52fb0d1bca2 100644
(file)
--- a/
source3/lib/select.c
+++ b/
source3/lib/select.c
@@
-39,11
+39,15
@@
static volatile unsigned pipe_written, pipe_read;
void sys_select_signal(char c)
{
+ int saved_errno = errno;
+
if (!initialised) return;
if (pipe_written > pipe_read+256) return;
if (write(select_pipe[1], &c, 1) == 1) pipe_written++;
+
+ errno = saved_errno;
}
/*******************************************************************