1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s3:lib/select: don't overwrite errno in the signal handler

metze
This commit is contained in:
Stefan Metzmacher 2009-09-20 23:29:34 +02:00
parent d13dfbeb6c
commit 00e378f17c

View File

@ -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;
}
/*******************************************************************