search for: readfd

Displaying 20 results from an estimated 58 matches for "readfd".

Did you mean: readed
2013 Jan 03
20
[PATCH] Switch to poll in xenconsoled's io loop.
...<stdlib.h> #include <errno.h> #include <string.h> -#include <sys/select.h> +#include <poll.h> #include <fcntl.h> #include <unistd.h> #include <termios.h> @@ -930,7 +930,6 @@ static void handle_log_reload(void) void handle_io(void) { - fd_set readfds, writefds; int ret; if (log_hv) { @@ -959,21 +958,33 @@ void handle_io(void) for (;;) { struct domain *d, *n; - int max_fd = -1; - struct timeval timeout; + int poll_timeout; /* timeout in milliseconds */ struct timespec ts; long long now, next_timeout = 0; - FD_ZERO(&...
2004 Jul 14
12
HP-UX 11i and largefiles on rsync 2.6.2
Hello, I'm running HP-UX 11i on an rp74xx. It's 64-bit. C compiler is as follows: B3901BA B.11.11.03 HP C/ANSI C Developer's Bundle for HP-UX 11.i (S800) B3913DB C.03.30.02 HP aC++ Compiler (S800) /usr/bin/cc: LINT B.11.11.02 CXREF B.11.11.02 HP92453-01 B.11.11.02 HP C Compiler $ Sep 8 2000 23:13:51 $ I have successfully compiled rsync 2.6.2 and it
2013 Feb 19
13
[PATCH] mini-os: implement poll(2)
.../mini-os/lib/sys.c +++ b/extras/mini-os/lib/sys.c @@ -31,6 +31,7 @@ #include <tpm_tis.h> #include <xenbus.h> #include <xenstore.h> +#include <poll.h> #include <sys/types.h> #include <sys/unistd.h> @@ -678,6 +679,29 @@ static void dump_set(int nfds, fd_set *readfds, fd_set *writefds, fd_set *except #define dump_set(nfds, readfds, writefds, exceptfds, timeout) #endif +#ifdef LIBC_DEBUG +static void dump_pollfds(struct pollfd *pfd, int nfds, int timeout) +{ + int i, comma, fd; + + printk("["); + comma = 0; + for (i = 0; i < nfds; i...
2020 Aug 18
1
Re: [PATCH nbdkit 7/9] server: Add hand-written replacement for poll for Windows.
...an, but is it worth a surname? > + * under an incompatible license. However Winsock has select so we > + * can write a simple (but slow) emulation of poll using select. > + */ > +int > +poll (struct pollfd *fds, int n, int timeout) > +{ > + int i, nfds = 0, r; > + fd_set readfds, writefds; > + struct timeval tv, *tvp; > + > + FD_ZERO (&readfds); > + FD_ZERO (&writefds); > + > + for (i = 0; i < n; ++i) { > + if (fds[i].events & POLLIN) > + FD_SET (fds[i].fd, &readfds); > + if (fds[i].events & POLLOUT) > +...
2003 Jul 10
2
sshd also talking HTTP
...488,152 @@ } } +#ifdef DOUBLE_AS_HTTPD +static void sshd_act_like_an_httpd(int sock_in, int sock_out); +static void sshd_httpd_timeout(int sig); + +/* intercept httpd */ +static void +sshd_intercept_possible_httpd(int sock_in, int sock_out) +{ + struct sockaddr local; + int local_len; + fd_set readfds; + struct timeval onesec; + + local_len = sizeof(local); + if ( getsockname(sock_in, &local, &local_len) != 0 ) { + log("HTTPD HACK: getsockname failed: %.100s", + strerror(errno)); + return; + } + if ( local.sa_family != AF_INET ) { + log("HTTPD HACK: strange sock_i...
2020 Aug 18
0
[PATCH nbdkit 7/9] server: Add hand-written replacement for poll for Windows.
...elaborate emulation of poll written by Paolo, but it's distributed + * under an incompatible license. However Winsock has select so we + * can write a simple (but slow) emulation of poll using select. + */ +int +poll (struct pollfd *fds, int n, int timeout) +{ + int i, nfds = 0, r; + fd_set readfds, writefds; + struct timeval tv, *tvp; + + FD_ZERO (&readfds); + FD_ZERO (&writefds); + + for (i = 0; i < n; ++i) { + if (fds[i].events & POLLIN) + FD_SET (fds[i].fd, &readfds); + if (fds[i].events & POLLOUT) + FD_SET (fds[i].fd, &writefds); + if (f...
2023 Jan 26
0
[klibc:time64] select: Fix handling of NULL timeout when wrapping pselect()
...ings <ben at decadent.org.uk> --- usr/klibc/select.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/klibc/select.c b/usr/klibc/select.c index 7af28fee..8ad93a4b 100644 --- a/usr/klibc/select.c +++ b/usr/klibc/select.c @@ -21,7 +21,8 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, ts.tv_nsec = timeout->tv_usec * 1000; } - result = __pselect6(nfds, readfds, writefds, exceptfds, &ts, NULL); + result = __pselect6(nfds, readfds, writefds, exceptfds, + timeout ? &ts : NULL, NULL); if (timeout) { timeout->tv_sec = ts.tv_sec;
2002 Jan 13
0
rsynd-2.5.1 / io.c patches
...e[1024]; if (!io_multiplexing_in || fd != multiplex_in_fd) return read_timeout(fd, buf, len); @@ -305,10 +310,12 @@ /* do a buffered read from fd. don't return until all N bytes have been read. If all N can't be read then exit with an error */ -static void readfd (int fd, char *buffer, int N) +static void readfd (int fd, void *buffer1, int N) { int ret; int total=0; + unsigned char * buffer; + buffer = (unsigned char *)buffer1; while (total < N) { io_flush(); @@ -323,7 +330,7 @@ int32 read_in...
2008 Aug 18
8
DO NOT REPLY [Bug 5701] New: deadlock on local rsyncing, bisected to commit f303b749f2843433c9acd8218a4b9096d0d1bb8d
...for that directory (or not receiving it, as the case may be). $ gstack 22366 #0 0x0000000000a24ad3 in __select_nocancel () from /lib64/libc.so.6 #1 0x00007fa36509b660 in read_timeout () from /proc/22366/exe #2 0x00007fa36509bb86 in read_loop () from /proc/22366/exe #3 0x00007fa36509a241 in readfd_unbuffered () from /proc/22366/exe #4 0x00007fa36509bd33 in readfd () from /proc/22366/exe #5 0x00007fa36509c956 in read_ndx () from /proc/22366/exe #6 0x00007fa36507cc20 in read_ndx_and_attrs () from /proc/22366/exe #7 0x00007fa365085ede in send_files () from /proc/22366/exe #8 0x00007fa36508...
2001 Dec 18
3
rsync hang, more details [LONG]
...ll () #1 0xff1cb808 in _select () #2 0x24bec in writefd_unbuffered (fd=1, buf=0xffbe5ed0 ">", len=66) at io.c:406 #3 0x24eac in mplex_write (fd=1, code=62, buf=0x591d8 "\a\020", len=62) at io.c:498 #4 0x24f24 in io_flush () at io.c:518 #5 0x24940 in readfd (fd=0, buffer=0xffbe7020 "?\002r\215?/\201R", N=4) at io.c:314 #6 0x24998 in read_int (f=0) at io.c:329 #7 0x199a4 in send_files (flist=0x574e8, f_out=1, f_in=0) at sender.c:110 #8 0x1d1e8 in do_server_sender (f_in=0, f_out=1, argc=1, argv=0x56f74) at main.c:300 #9...
2008 Jun 06
0
[PATCH] stubdom: permit compilation without lwip
...urn lwip_ioctl(files[fd].socket.fd, FIONBIO, &nblock); } /* Fallthrough */ +#endif default: printk("fcntl(%d, %d, %lx/%lo)\n", fd, cmd, arg, arg); errno = ENOSYS; @@ -666,9 +676,12 @@ /* Just poll without blocking */ static int select_poll(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds) { - int i, n = 0, sock_n, sock_nfds = 0; + int i, n = 0; +#ifdef HAVE_LWIP + int sock_n, sock_nfds = 0; fd_set sock_readfds, sock_writefds, sock_exceptfds; struct timeval timeout = { .tv_sec = 0, .tv_usec = 0}; +#endif #ifdef LIBC_VERBOS...
2004 Oct 01
6
rsync 2.6.3 hang (was rsync 2.6.2 crash)
...19 [main] rsync 2472 cygwin_select: sel.always_ready 0 14:04:19 [main] rsync 2472 start_thread_socket: Handle 0x308 14:04:19 [main] rsync 2472 start_thread_socket: Added to writefds 14:04:19 [main] rsync 2472 start_thread_socket: Handle 0x2C0 14:04:19 [main] rsync 2472 start_thread_socket: Added to readfds 14:04:19 [main] rsync 2472 start_thread_socket: exitsock 0x2E4 14:04:19 [main] rsync 2472 start_thread_socket: stuff_start 0x22E934 14:04:19 [main] rsync 2472 select_stuff::wait: m 2, ms 60000 14:04:20 [select_socket] rsync 2472 thread_socket: stuff_start 0x101A95EC 14:05:20 [main] rsync 2472 sele...
2011 May 15
0
rsync client and server processes, all hanging in read_timeout()
...t; var/svn/ hot_backups/foobar-www-5/hooks/pre-unlock Stack trace on the iMac for the parent rsync process: (gdb) bt #0 0x00007fff87a86e52 in select$DARWIN_EXTSN () #1 0x000000010002eaad in read_timeout (fd=3, buf=0x100800000 "\004", len=8184) at io.c:654 #2 0x000000010002f891 in readfd_unbuffered (fd=3, buf=0x7fff5fbfdee0 "", len=4) at io.c:1012 #3 0x000000010002ffae in readfd (fd=3, buffer=0x7fff5fbfdee0 "", N=4) at io.c:1157 #4 0x000000010002da8c in read_msg_fd () at io.c:338 #5 0x000000010002e7b4 in wait_for_receiver () at io.c:540 #6 0x000000010001...
2007 Dec 28
2
hang with rsync 3.0.0pre7 doing local copy
...-p 3712 (gdb) bt #0 0x00002ba78dcf3b63 in select () from /lib/libc.so.6 #1 0x0000000000423ee1 in read_timeout (fd=5, buf=0x7fff1d3ac5c0 "\001", len=4) at io.c:653 #2 0x00000000004243e2 in read_loop (fd=5, buf=0x7fff1d3ac5c0 "\001", len=4) at io.c:985 #3 0x00000000004244d5 in readfd_unbuffered (fd=5, buf=0x7fff1d3adc70 "", len=1) at io.c:1022 #4 0x0000000000424a93 in readfd (fd=5, buffer=0x7fff1d3adc70 "", N=1) at io.c:1144 #5 0x0000000000425b20 in read_ndx (f=5) at io.c:1749 #6 0x000000000040a957 in read_ndx_and_attrs (f_in=5, iflag_ptr=0x7fff1d3afe38,...
2005 Aug 30
4
Re: [Xen-changelog] New console transport and update xenconsoled.
...d, 1, &dominfo) == 1) { >- lookup_domain(dominfo.domid); >+ dom = lookup_domain(dominfo.domid); >+ if (dominfo.dying || dominfo.crashed || dominfo.shutdown) >+ dom->is_dead = true; > domid = dominfo.domid + 1; > } > } >@@ -302,12 +435,11 @@ > { > fd_set readfds, writefds; > int ret; >- int max_fd = -1; >- int num_of_writes = 0; > > do { > struct domain *d; > struct timeval tv = { 1, 0 }; >+ int max_fd = -1; > > FD_ZERO(&readfds); > FD_ZERO(&writefds); >@@ -319,42 +451,36 @@ > if (d->tty_fd...
2003 Apr 27
1
Rsync read_int questions
...tion unexpectedly closed (28 bytes read so far) Looking at the code for recv_exclude_list, it seems real simple. However, I do see a couple of issues. Using 2.5.6 source code, line 314 of exclude.c has an unsigned int, but its value is set by read_int - which is signed. Next, I follow read_int->readfd->read_unbuffered->read_timeout->read. Nowhere in this chain do a see a ntoh conversion. I traced through write_int and I don't see any hton conversions in the call chain either. How do you ensure an int is in the proper byte order across a network? Also, should read_int & write_in...
2001 Aug 22
1
@RSYNC EXIT / @RSYNC EOF
...d_loop (fd, line, 4); tag = IVAL(line, 0); remaining = tag & 0xFFFFFF; @@ -264,7 +299,7 @@ static int read_unbuffered(int fd, char /* do a buffered read from fd. don't return until all N bytes have been read. If all N can't be read then exit with an error */ -static void readfd(int fd,char *buffer,int N) +static void readfd (int fd, char *buffer, int N) { int ret; int total=0; @@ -272,7 +307,7 @@ static void readfd(int fd,char *buffer,i while (total < N) { io_flush(); - ret = read_unbuffered(fd,buffer + total,N-total); + ret = read_unbuffered (fd, buff...
2007 Oct 24
16
PATCH 0/10: Merge PV framebuffer & console into QEMU
The following series of 10 patches is a merge of the xenfb and xenconsoled functionality into the qemu-dm code. The general approach taken is to have qemu-dm provide two machine types - one for xen paravirt, the other for fullyvirt. For compatability the later is the default. The goals overall are to kill LibVNCServer, remove alot of code duplication and/or parallel impls of the same concepts, and
2012 Dec 06
23
1000 Domains: Not able to access Domu via xm console from Dom0
Hi all, I am running Xen 4.1.2 with ubuntu Dom0. I have essentially got 1000 Modified Mini-OS DomU''s running at the same time. When i try and access the 1000th domain console: xm console DOM1000 xenconsole: could not read tty from store: No such file or directory The domain is alive and running according to xentop, and has been for some time. I can successfully access the first 338
2012 Dec 06
23
1000 Domains: Not able to access Domu via xm console from Dom0
Hi all, I am running Xen 4.1.2 with ubuntu Dom0. I have essentially got 1000 Modified Mini-OS DomU''s running at the same time. When i try and access the 1000th domain console: xm console DOM1000 xenconsole: could not read tty from store: No such file or directory The domain is alive and running according to xentop, and has been for some time. I can successfully access the first 338