lib/util: Remove unused sys_select_signal()
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Feb 2012 02:02:14 +0000 (13:02 +1100)
committerJeremy Allison <jra@samba.org>
Thu, 16 Feb 2012 23:49:09 +0000 (15:49 -0800)
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 <jra@samba.org>
lib/util/select.c
lib/util/select.h

index b9326ef9019935f4ed1ff689085a8d2468a23be7..63be55cf0c6b703e0068233d3aa8c1425e55821f 100644 (file)
@@ -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.
  *
index 36efa6e83b9c5e6603a63bb74d99b926a9591898..bfc78a99d2f70638dc84403a7e04b4524c398a22 100644 (file)
@@ -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);