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:
parent
d13dfbeb6c
commit
00e378f17c
@ -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;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user