summaryrefslogtreecommitdiff
path: root/source4/lib/smbreadline
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-10-01 10:08:15 +0200
committerGünther Deschner <gd@samba.org>2010-10-01 22:30:22 +0200
commitb38d0542e193512796d5d9502ac8d688a1036157 (patch)
treed2815827c2a6695696f5ff8dd8853a70700ea7e9 /source4/lib/smbreadline
parent0adc1645e23fedf52b10ed545eb9935df9ad7b6f (diff)
downloadsamba-b38d0542e193512796d5d9502ac8d688a1036157.tar.gz
samba-b38d0542e193512796d5d9502ac8d688a1036157.tar.bz2
samba-b38d0542e193512796d5d9502ac8d688a1036157.zip
samba: share select wrappers.
Guenther
Diffstat (limited to 'source4/lib/smbreadline')
-rw-r--r--source4/lib/smbreadline/smbreadline.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c
index b07417357f..fa59e5d7d5 100644
--- a/source4/lib/smbreadline/smbreadline.c
+++ b/source4/lib/smbreadline/smbreadline.c
@@ -24,51 +24,6 @@
#include "system/readline.h"
#include "lib/smbreadline/smbreadline.h"
-/*******************************************************************
- Similar to sys_select() but catch EINTR and continue.
- This is what sys_select() used to do in Samba.
-********************************************************************/
-
-static int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval)
-{
- int ret;
- fd_set *readfds2, readfds_buf, *writefds2, writefds_buf, *errorfds2, errorfds_buf;
- struct timeval tval2, *ptval;
-
- readfds2 = (readfds ? &readfds_buf : NULL);
- writefds2 = (writefds ? &writefds_buf : NULL);
- errorfds2 = (errorfds ? &errorfds_buf : NULL);
- ptval = (tval ? &tval2 : NULL);
-
- do {
- if (readfds)
- readfds_buf = *readfds;
- if (writefds)
- writefds_buf = *writefds;
- if (errorfds)
- errorfds_buf = *errorfds;
- if (tval)
- tval2 = *tval;
-
- /* We must use select and not sys_select here. If we use
- sys_select we'd lose the fact a signal occurred when sys_select
- read a byte from the pipe. Fix from Mark Weaver
- <mark-clist@npsl.co.uk>
- */
-
- ret = select(maxfd, readfds2, writefds2, errorfds2, ptval);
- } while (ret == -1 && errno == EINTR);
-
- if (readfds)
- *readfds = readfds_buf;
- if (writefds)
- *writefds = writefds_buf;
- if (errorfds)
- *errorfds = errorfds_buf;
-
- return ret;
-}
-
/****************************************************************************
Display the prompt and wait for input. Call callback() regularly
****************************************************************************/