search for: accept4

Displaying 20 results from an estimated 145 matches for "accept4".

Did you mean: accept
2016 Jan 06
0
[klibc:master] Add accept4(), handle fallback from accept () to accept4()
...rnel.org/?p=libs/klibc/klibc.git;a=commit;h=cf8147c43a60d9eb6a6713d16f30364a698a6936 Author: H. Peter Anvin <hpa at linux.intel.com> AuthorDate: Tue, 5 Jan 2016 18:31:40 -0800 Committer: H. Peter Anvin <hpa at linux.intel.com> CommitDate: Tue, 5 Jan 2016 18:35:16 -0800 [klibc] Add accept4(), handle fallback from accept() to accept4() Add support for the accept4() system call. Some architectures now have accept4() but not accept(), so introduce a standard fallback. However, since accept() is a socketcall, we have to do some special hacks. While we are at it, handle conditional so...
2015 Oct 05
1
[PATCH] lib: include <sys/socket.h> for accept4
...1 + 1 file changed, 1 insertion(+) diff --git a/src/conn-socket.c b/src/conn-socket.c index a935cc4..05177ca 100644 --- a/src/conn-socket.c +++ b/src/conn-socket.c @@ -28,6 +28,7 @@ #include <errno.h> #include <poll.h> #include <sys/stat.h> +#include <sys/socket.h> /* accept4 */ #include <sys/types.h> #include <assert.h> #include <libintl.h> -- 2.1.0
2015 Feb 09
5
Re: Patchable build problems on OS X 10.10
...it to have a reasonably new version of This IMHO is clearly wrong: the O_* constants are for open() & friends, not for socket & socket4. Theoretically, we could switch the socket() usages in launch-libvirt.c to socket4(), which can be replaced by gnulib if missing (we already use the "accept4" gnulib module). On the other hand, it seems that such gnulib emulation does not provide SOCK_NONBLOCK, so either a) fix that in gnulib b) use the "nonblocking" gnulib module, using set_nonblocking_flag() instead of SOCK_NONBLOCK Also, sys/un.h is POSIX [1], so it can be included...
2019 Sep 18
2
[PATCH] build: remove unused gnulib modules
...efile.am | 4 ---- m4/.gitignore | 39 --------------------------------------- 4 files changed, 56 deletions(-) diff --git a/bootstrap b/bootstrap index aaf038d98..ee253b471 100755 --- a/bootstrap +++ b/bootstrap @@ -104,7 +104,6 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool modules=' accept4 -areadlink areadlinkat arpa_inet base64 @@ -113,15 +112,11 @@ c-ctype cloexec closeout connect -dup3 error -filevercmp fstatat -fts full-read full-write futimens -getaddrinfo getline getprogname gitlog-to-changelog @@ -143,22 +138,18 @@ mkstemps netdb netinet_in nonblocking -openat...
2019 Aug 01
1
Re: [nbdkit PATCH 9/8] sh: Document CLOEXEC considerations
This patch series is fine, ACK. Unfortunately it likely breaks Haiku support. I'd like to hear from the Haiku folk if they are planning support for atomic CLOEXEC (SOCK_CLOEXEC, accept4, pipe2, etc.) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
2019 Aug 02
2
Re: [nbdkit PATCH v2 10/17] plugins: Add .fork_safe field
...ly restrict Haiku to the fully serialized mode. Sucks for them, but they can fix it by adding atomic CLOEXEC features ... > + .fork_safe = 0, /* libguestfs uses fork(), unaudited for safety */ libguestfs does use fork and should be safe - we're pretty careful about using CLOEXEC, accept4, etc everywhere. (Also libguestfs doesn't run on Haiku and architecturally that's unlikely to ever happen). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk us...
2019 Aug 01
1
Re: [nbdkit PATCH 4/8] Revert "RHEL 5: Define O_CLOEXEC and SOCK_CLOEXEC."
...t;> As far as I can see Haiku (hrev52698) has O_CLOEXEC but NOT >> SOCK_CLOEXEC. As this version is a little old I'll do an update and >> see if newer versions support it. > > I'm on hrev53313+1 which also doesn't appear to have SOCK_CLOEXEC (nor > does it have accept4). Ouch. Then I'm seriously thinking of a followup patch which either forces SERIALIZE_ALL_REQUESTS on all plugins when SOCK_CLOEXEC is missing, or which adds a bool to the plugin interface that the plugin sets to true if it does not fork (default to false), and where we force SERIALIZE_ALL_REQ...
2019 Aug 02
1
[nbdkit PATCH] server: Restrict thread model when no atomic CLOEXEC
...just always force serialization (no client thread will be executing when nbdkit itself is creating a new file descriptor) than to audit which plugins actually care about not getting any leaked fds. We have one final function that we need to use for atomic CLOEXEC; the next patch will actually put accept4() to use. Maybe this penalization will encourage Haiku to implement atomic CLOEXEC sooner. Accordingly, the testsuite is tweaked to skip tests that require parallel execution. Signed-off-by: Eric Blake <eblake@redhat.com> --- This replaces my .fork_safe patch; I've rebased the rest of...
2019 Aug 01
2
Re: [nbdkit PATCH 4/8] Revert "RHEL 5: Define O_CLOEXEC and SOCK_CLOEXEC."
On Wed, Jul 31, 2019 at 04:31:32PM -0500, Eric Blake wrote: > This reverts commit 25206df20275aeff346d9b86adf5e9be99cc9e43. > > An upcoming patch wants to ensure no leaked fds from the server to a > child process. POSIX has required O_CLOEXEC since 2008, and although > current POSIX doesn't yet specify full atomic interfaces everywhere > such as SOCK_CLOEXEC, it does have
2019 Sep 18
1
[PATCH nbdkit] server: Remove useless thread local sockaddr.
...r (&data->addr, data->addrlen); handle_single_connection (data->sock, data->sock); @@ -299,12 +296,9 @@ accept_connection (int listen_sock) } thread_data->instance_num = instance_num++; - thread_data->addrlen = sizeof thread_data->addr; again: #ifdef HAVE_ACCEPT4 - thread_data->sock = accept4 (listen_sock, - &thread_data->addr, &thread_data->addrlen, - SOCK_CLOEXEC); + thread_data->sock = accept4 (listen_sock, NULL, NULL, SOCK_CLOEXEC); #else /* If we were fully parallel,...
2019 Jan 19
1
[ANNOUNCE] klibc 2.0.5
...Anvin (14): [klibc] 2.0.4 released, next version is 2.0.5 [klibc] Inline __arch_libcinit() [klibc] i386: remove special handling of socketcall [klibc] Update README.klibc [klibc] Remove obsolete getpt() function [klibc] Remove sys/socketcalls.h [klibc] Add accept4(), handle fallback from accept() to accept4() [klibc] Remove open_cloexec() [klibc] accept.c: fix file header [klibc] Make posix_openpt() an inline [klibc] stdlib.h: include <fcntl.h> for inline of posix_grantpt() [klibc] Make asprintf() a simple wrapper around v...
2019 Sep 18
0
Re: [PATCH] build: remove unused gnulib modules
...------------------------------------ > 4 files changed, 56 deletions(-) > > diff --git a/bootstrap b/bootstrap > index aaf038d98..ee253b471 100755 > --- a/bootstrap > +++ b/bootstrap > @@ -104,7 +104,6 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool > > modules=' > accept4 > -areadlink > areadlinkat > arpa_inet > base64 > @@ -113,15 +112,11 @@ c-ctype > cloexec > closeout > connect > -dup3 > error > -filevercmp > fstatat > -fts > full-read > full-write > futimens > -getaddrinfo > getline > getprogn...
2019 Sep 23
0
[PATCH v2 5/5] build: remove unused gnulib modules
...| 5 ----- m4/.gitignore | 52 ---------------------------------------------- 4 files changed, 78 deletions(-) diff --git a/bootstrap b/bootstrap index aaf038d98..9e5a8b72d 100755 --- a/bootstrap +++ b/bootstrap @@ -104,34 +104,26 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool modules=' accept4 -areadlink areadlinkat -arpa_inet base64 byteswap c-ctype cloexec closeout connect -dup3 error -filevercmp fstatat -fts full-read full-write futimens -getaddrinfo getline getprogname gitlog-to-changelog glob -gnu-make gnumakefile hash hash-pjw human -iconv ignore-value intprop...
2019 Aug 01
0
Re: [nbdkit PATCH 4/8] Revert "RHEL 5: Define O_CLOEXEC and SOCK_CLOEXEC."
...ichard W.M. Jones wrote: > As far as I can see Haiku (hrev52698) has O_CLOEXEC but NOT > SOCK_CLOEXEC. As this version is a little old I'll do an update and > see if newer versions support it. I'm on hrev53313+1 which also doesn't appear to have SOCK_CLOEXEC (nor does it have accept4). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guest...
2010 Dec 06
0
nginx-0.9.2
Changes with nginx 0.9.2 06 Dec 2010 *) Feature: the "If-Unmodified-Since" client request header line support. *) Workaround: fallback to accept() syscall if accept4() was not implemented; the issue had appeared in 0.9.0. *) Bugfix: nginx could not be built on Cygwin; the issue had appeared in 0.9.0. *) Bugfix: for OpenSSL vulnerability CVE-2010-4180. Thanks to Maxim Dounin. -- Igor Sysoev http://sysoev.ru/en/
2013 Sep 04
3
[PATCH 0/2] Clean up compilation from git a little bit
SSIA Martin Kletzander (2): Don't redefine _FORTIFY_SOURCE Get rid of gnulib error bootstrap | 2 +- configure.ac | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -- 1.8.3.2
2015 Feb 09
0
Re: Patchable build problems on OS X 10.10
...nd there could be systems where this is not true. The macros as defined only affect systems that don't define SOCK_* at all. > Theoretically, we could switch the socket() usages in launch-libvirt.c > to socket4(), which can be replaced by gnulib if missing (we already > use the "accept4" gnulib module). On the other hand, it seems that > such gnulib emulation does not provide SOCK_NONBLOCK, so either > a) fix that in gnulib > b) use the "nonblocking" gnulib module, using set_nonblocking_flag() > instead of SOCK_NONBLOCK (b) would not be atomic. I...
2019 Aug 02
0
Re: [nbdkit PATCH v2 10/17] plugins: Add .fork_safe field
...can manage to do that by replacing this patch with just blind penalization of non-atomic CLOEXEC. > >> + .fork_safe = 0, /* libguestfs uses fork(), unaudited for safety */ > > libguestfs does use fork and should be safe - we're pretty careful > about using CLOEXEC, accept4, etc everywhere. (Also libguestfs > doesn't run on Haiku and architecturally that's unlikely to ever > happen). Nice to know. That was half of the review - determining which libraries use which functions, and what might still need fixing (or bugs filed to other projects). It also l...
2015 Jun 25
0
[PATCH v2 4/9] daemon: Add -l / --listen flag.
...; + addr.sun_path[UNIX_PATH_MAX-1] = '\0'; + + if (bind (sock, (struct sockaddr *) &addr, sizeof addr) == -1) + error (EXIT_FAILURE, errno, "bind: %s", channel); + + if (listen (sock, 4) == -1) + error (EXIT_FAILURE, errno, "listen"); + + sock = accept4 (sock, NULL, NULL, SOCK_CLOEXEC); + if (sock == -1) + error (EXIT_FAILURE, errno, "accept"); } /* If it's a serial-port like device then it probably has echoing diff --git a/daemon/guestfsd.pod b/daemon/guestfsd.pod index 1ed31a9..22c8003 100644 --- a/daemon/guestfsd.p...
2015 Feb 05
4
Patchable build problems on OS X 10.10
Hello, I'm attempting to create a Homebrew formula to get libguestfs to compile on Mac OS X. I've managed to achieve success with several monkey patches, but since Homebrew's policy is to contact maintainers about proper fixes in upstream, I would like to ask if there are any plans to fix these issues. I'm afraid I don't know C well enough to propose decent solutions myself.