summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/select.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/select.c b/source3/lib/select.c
index a58530af8d..b5443ff20c 100644
--- 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;
}
/*******************************************************************