From ab80995580f092811d6380caa9e71e4c5fda06f4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 9 Feb 2012 13:02:14 +1100 Subject: [PATCH] lib/util: Remove unused sys_select_signal() Now sys_poll needs to be cleaned up not to refer to the pipe that is now not used. Andrew Bartlett Signed-off-by: Jeremy Allison --- lib/util/select.c | 18 ------------------ lib/util/select.h | 1 - 2 files changed, 19 deletions(-) diff --git a/lib/util/select.c b/lib/util/select.c index b9326ef9019..63be55cf0c6 100644 --- a/lib/util/select.c +++ b/lib/util/select.c @@ -35,24 +35,6 @@ static pid_t initialised; static int select_pipe[2]; static volatile unsigned pipe_written, pipe_read; -/******************************************************************* - Call this from all Samba signal handlers if you want to avoid a - nasty signal race condition. -********************************************************************/ - -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; -} - /* * sys_poll expects pollfd's to be a talloc'ed array. * diff --git a/lib/util/select.h b/lib/util/select.h index 36efa6e83b9..bfc78a99d2f 100644 --- a/lib/util/select.h +++ b/lib/util/select.h @@ -24,7 +24,6 @@ /* The following definitions come from lib/util/select.c */ -void sys_select_signal(char c); int sys_poll(struct pollfd *fds, int num_fds, int timeout); int sys_poll_intr(struct pollfd *fds, int num_fds, int timeout); -- 2.11.4.GIT