search for: sock_nonblock

Displaying 20 results from an estimated 33 matches for "sock_nonblock".

2015 Feb 09
5
Re: Patchable build problems on OS X 10.10
...uestfs_protocol.h" > > > > +/* Fixes for Mac OS X */ > > +#if defined __APPLE__ && defined __MACH__ > > +#include <sys/un.h> > > +#endif > > +#ifndef SOCK_CLOEXEC > > +# define SOCK_CLOEXEC O_CLOEXEC > > +#endif > > +#ifndef SOCK_NONBLOCK > > +# define SOCK_NONBLOCK O_NONBLOCK > > +#endif > > +/* End of fixes for Mac OS X */ > > + > > /* Check minimum required version of libvirt. The libvirt backend > > * is new and not the default, so we can get away with forcing > > * people who want...
2019 May 25
2
[PATCH libnbd] states: connect_command: Don't set O_NONBLOCK on socket passed to child.
...t;fcntl.h> #include <errno.h> #include <signal.h> #include <netdb.h> @@ -183,12 +184,12 @@ CONNECT_COMMAND.START: int sv[2]; pid_t pid; + int flags; assert (!h->sock); assert (h->argv); assert (h->argv[0]); - if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0, - sv) == -1) { + if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, sv) == -1) { SET_NEXT_STATE (%.DEAD); set_error (errno, "socketpair"); return -1; @@ -219,13 +220,27 @@ } /* Parent. */ + close (sv[1]); + h->pid = pid;...
2019 May 25
1
Re: [PATCH libnbd] states: connect_command: Don't set O_NONBLOCK on socket passed to child.
...;> --- >> generator/states-connect.c | 21 ++++++++++++++++++--- >> 1 file changed, 18 insertions(+), 3 deletions(-) >> > >> assert (!h->sock); >> assert (h->argv); >> assert (h->argv[0]); >> - if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0, >> - sv) == -1) { >> + if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, sv) == -1) { > > Is it any easier to keep SOCK_NONBLOCK here and then clear O_NONBLOCK in > the child process? It may matter if we try to port to a system that >...
2015 Feb 09
0
Re: Patchable build problems on OS X 10.10
...> > +/* Fixes for Mac OS X */ > > > +#if defined __APPLE__ && defined __MACH__ > > > +#include <sys/un.h> > > > +#endif > > > +#ifndef SOCK_CLOEXEC > > > +# define SOCK_CLOEXEC O_CLOEXEC > > > +#endif > > > +#ifndef SOCK_NONBLOCK > > > +# define SOCK_NONBLOCK O_NONBLOCK > > > +#endif > > > +/* End of fixes for Mac OS X */ > > > + > > > /* Check minimum required version of libvirt. The libvirt backend > > > * is new and not the default, so we can get away with forcing...
2019 May 25
1
Interesting libnbd/nbdkit bug
...n and nbdkit is consuming 100% of CPU. In all other respects everything works fine, you can send commands etc. Anyway I tracked the issue down. nbdkit sits in a loop continuously reading stdin, each read(2) call returning EAGAIN. The reason for that is because libnbd opens a socketpair with the SOCK_NONBLOCK option and passes one half directly to the forked subprocess. It's obviously a bug, but I'm not sure if libnbd should be unsetting the SOCK_NONBLOCK option or if nbdkit should be doing it. Maybe both! Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjone...
2015 Feb 05
4
Patchable build problems on OS X 10.10
...6 on 10.10: * It's not possible to build Java bindings with Java 8, because javadoc fails on GuestFS.java with a hundred or so errors. * ruby/Makefile.in assumes a .so extension for the built file, while on Mac DLEXT appears to default to .bundle. * src/launch-libvirt.c uses SOCK_CLOEXEC and SOCK_NONBLOCK which don't exist on Darwin. * src/launch-libvirt.c needs to #include <sys/un.h> for sockaddr_un. The rest of the issues have been mentioned in https://www.redhat.com/archives/libguestfs/2013-October/msg00042.html, and I've reused RWMJ's patches. * fuse/guestunmount.c uses Linu...
2019 May 25
0
Re: [PATCH libnbd] states: connect_command: Don't set O_NONBLOCK on socket passed to child.
...e socket along > error paths. > --- > generator/states-connect.c | 21 ++++++++++++++++++--- > 1 file changed, 18 insertions(+), 3 deletions(-) > > assert (!h->sock); > assert (h->argv); > assert (h->argv[0]); > - if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0, > - sv) == -1) { > + if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, sv) == -1) { Is it any easier to keep SOCK_NONBLOCK here and then clear O_NONBLOCK in the child process? It may matter if we try to port to a system that lacks SOCK_CLOEXEC (SOCK_NON...
2019 Oct 18
0
[PATCH libnbd 1/2] states: Don't assume socket address family is always AF_UNIX.
...rtions(+), 1 deletion(-) diff --git a/generator/states-connect.c b/generator/states-connect.c index 04e894c..d62b0f5 100644 --- a/generator/states-connect.c +++ b/generator/states-connect.c @@ -51,7 +51,8 @@ STATE_MACHINE { int fd; assert (!h->sock); - fd = socket (AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0); + fd = socket (h->connaddr.ss_family, + SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0); if (fd == -1) { SET_NEXT_STATE (%.DEAD); set_error (errno, "socket"); -- 2.23.0
2019 Oct 18
5
[PATCH libnbd 0/2] api: Add support for AF_VSOCK.
This is a series of patches to libnbd and nbdkit adding AF_VSOCK support. On the host side it allows you to start an nbdkit instance which listens on a virtio-vsock socket: $ ./nbdkit -fv --vsock memory 1G ... nbdkit: debug: bound to vsock 2:10809 On the guest side you can then use libnbd to connect to the server: $ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c
2013 Nov 08
1
Rsync hanging, even with timeout and contimeout specified
...CHLD], NULL, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f4310247450}, NULL, 8) = 0 rt_sigaction(SIGXFSZ, {SIG_IGN, [], SA_RESTORER|SA_NOCLDSTOP, 0x7f4310247450}, NULL, 8) = 0 getcwd("/tmp", 4095) = 5 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3 connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(3) = 0 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3 connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/s...
2014 Jan 16
0
Generic UPS driver
...ad(4, "", 4096) = 0 close(4) = 0 munmap(0x7fa313f8d000, 4096) = 0 write(2, " 0.000000\t", 12) = 12 write(2, "debug level is '3'\n", 19) = 19 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4 connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(4) = 0 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4 connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/s...
2015 Jan 03
2
Samba4 Kerberos kinit does not resolve kdc hostname
...0) = 0xb6f0a000 read(3, "domain family.rapsberry.local\nse"..., 4096) = 87 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb6f0a000, 4096) = 0 gettimeofday({1420299769, 869502}, NULL) = 0 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3 connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.178.222")}, 16) = 0 gettimeofday({1420299769, 873429}, NULL) = 0 poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3, revents=POLLOUT}]) send(3, "\300\325\1\0\0\1\0\0\0\0\0\0\t_kerberos\4_...
2023 Nov 29
1
NSD 4.8.0rc1 pre-release
...ster stats. Statistics can be gathered while a reload is in progress. BUG FIXES: - Merge #282: Improve nsd.conf man page. - Fix unused but set variable warning. - Fix #283: Compile failure in remote.c when --disable-bind8-stats and --without-ssl are specified. - Fix #284: dnstap_collector.c: SOCK_NONBLOCK is not available on Mac/Darwin. - Fix unused variable warning in unit test of udb. - Merge #287: Update nsd.conf.5.in. - Fix autoconf 2.69 warnings in configure. - Merge #295: Update e-mail addresses, add ref to support contracts - Fix for interprocess communication to set quit sync command from...
2015 Jan 03
2
Samba4 Kerberos kinit does not resolve kdc hostname
...rapsberry.local\nse"..., 4096) = 87 >> read(3, "", 4096) = 0 >> close(3) = 0 >> munmap(0xb6f0a000, 4096) = 0 >> gettimeofday({1420299769, 869502}, NULL) = 0 >> socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3 >> connect(3, {sa_family=AF_INET, sin_port=htons(53), >> sin_addr=inet_addr("192.168.178.222")}, 16) = 0 >> gettimeofday({1420299769, 873429}, NULL) = 0 >> poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3, revents=POLLOUT}]) >> send(3, &q...
2015 Feb 06
0
Re: Patchable build problems on OS X 10.10
...ternal-actions.h" > #include "guestfs_protocol.h" > > +/* Fixes for Mac OS X */ > +#if defined __APPLE__ && defined __MACH__ > +#include <sys/un.h> > +#endif > +#ifndef SOCK_CLOEXEC > +# define SOCK_CLOEXEC O_CLOEXEC > +#endif > +#ifndef SOCK_NONBLOCK > +# define SOCK_NONBLOCK O_NONBLOCK > +#endif > +/* End of fixes for Mac OS X */ > + > /* Check minimum required version of libvirt. The libvirt backend > * is new and not the default, so we can get away with forcing > * people who want to try it to have a reasonably new...
2015 Jan 03
1
Samba4 Kerberos kinit does not resolve kdc hostname
...>>>> read(3, "", 4096) = 0 >>>> close(3) = 0 >>>> munmap(0xb6f0a000, 4096) = 0 >>>> gettimeofday({1420299769, 869502}, NULL) = 0 >>>> socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3 >>>> connect(3, {sa_family=AF_INET, sin_port=htons(53), >>>> sin_addr=inet_addr("192.168.178.222")}, 16) = 0 >>>> gettimeofday({1420299769, 873429}, NULL) = 0 >>>> poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3, >&...
2013 Mar 10
1
Samba DC join fails - IPv4/IPv6 issue
...igured without IPv6 address (see further down below) samba-tool still tries to address the DC's LDAP server via IPv6 - and fails miserably: root at elektron:~# strace -f -e trace=network /opt/samba4/bin/samba-tool domain join linex.r00t.la DC <...> [pid 1640] socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 5 [pid 1640] connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.6")}, 16) = 0 [pid 1640] send(5, "NQ\1\0\0\1\0\0\0\0\0\0\5venus\5linex\4r00t\2la"..., 37, MSG_NOSIGNAL) = 37 [pid 1640] recvfrom(5, "NQ\205\200\0\1\0\1\0\0\0\0\5v...
2015 Jan 03
0
Samba4 Kerberos kinit does not resolve kdc hostname
..."domain family.rapsberry.local\nse"..., 4096) = 87 > read(3, "", 4096) = 0 > close(3) = 0 > munmap(0xb6f0a000, 4096) = 0 > gettimeofday({1420299769, 869502}, NULL) = 0 > socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3 > connect(3, {sa_family=AF_INET, sin_port=htons(53), > sin_addr=inet_addr("192.168.178.222")}, 16) = 0 > gettimeofday({1420299769, 873429}, NULL) = 0 > poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3, revents=POLLOUT}]) > send(3, "\300\325\1\0\0\1...
2015 Jan 03
0
Samba4 Kerberos kinit does not resolve kdc hostname
...quot;..., 4096) = 87 >>> read(3, "", 4096) = 0 >>> close(3) = 0 >>> munmap(0xb6f0a000, 4096) = 0 >>> gettimeofday({1420299769, 869502}, NULL) = 0 >>> socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3 >>> connect(3, {sa_family=AF_INET, sin_port=htons(53), >>> sin_addr=inet_addr("192.168.178.222")}, 16) = 0 >>> gettimeofday({1420299769, 873429}, NULL) = 0 >>> poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3, revents=POLLOUT}]) &gt...
2014 Jan 12
3
Generic UPS driver
On Jan 12, 2014, at 11:07 AM, Ariel Wainer wrote: > On 11/01/14 15:27, Charles Lepple wrote: >> On Jan 10, 2014, at 4:46 PM, Ariel Wainer wrote: >> >>> On 10/01/14 01:53, Charles Lepple wrote: >>>> I am curious about why the Interrupt Out packet is sent by the Windows software if it isn't to turn off the UPS. Is it possible to do some more testing with