Displaying 5 results from an estimated 5 matches for "nbd_internal_socketpair".
2023 Feb 15
1
[libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert()
...FE_ASSERT(expression) \
> + (nbd_internal_fork_safe_assert ((expression) != 0, __FILE__, __LINE__, \
> + __func__, #expression))
> +#endif
> +
> #endif /* LIBNBD_INTERNAL_H */
> +++ b/lib/utils.c
> @@ -431,13 +431,35 @@ nbd_internal_socketpair (int domain, int type, int protocol, int *fds)
> if (ret == 0) {
> for (i = 0; i < 2; i++) {
> if (fcntl (fds[i], F_SETFD, FD_CLOEXEC) == -1) {
> close (fds[0]);
> close (fds[1]);
> return -1;
> }
> }
> }
> #...
2023 Feb 20
2
[libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert()
...\
>> + (nbd_internal_fork_safe_assert ((expression) != 0, __FILE__, __LINE__, \
>> + __func__, #expression))
>> +#endif
>> +
>> #endif /* LIBNBD_INTERNAL_H */
>
>> +++ b/lib/utils.c
>> @@ -431,13 +431,35 @@ nbd_internal_socketpair (int domain, int type, int protocol, int *fds)
>> if (ret == 0) {
>> for (i = 0; i < 2; i++) {
>> if (fcntl (fds[i], F_SETFD, FD_CLOEXEC) == -1) {
>> close (fds[0]);
>> close (fds[1]);
>> return -1;
>> }
&...
2023 Mar 15
4
[libnbd PATCH v4 0/3] lib/utils: add async-signal-safe assert()
This is version 4 of the following sub-series:
[libnbd PATCH v3 06/29] lib/utils: introduce xwrite() as a more robust write()
[libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert()
[libnbd PATCH v3 08/29] lib/utils: add unit test for async-signal-safe assert()
http://mid.mail-archive.com/20230215141158.2426855-7-lersek at redhat.com
2023 Mar 23
1
[libnbd PATCH v3 14/19] CONNECT_COMMAND.START: plug child process leak on error
...ONNECT_COMMAND.START:
enum state next;
+ bool parentfd_transferred;
int sv[2];
- pid_t pid;
int flags;
struct socket *sock;
+ pid_t pid;
assert (!h->sock);
assert (h->argv.ptr);
assert (h->argv.ptr[0]);
next = %.DEAD;
+ parentfd_transferred = false;
if (nbd_internal_socketpair (AF_UNIX, SOCK_STREAM, 0, sv) == -1) {
set_error (errno, "socketpair");
goto done;
}
/* A process is effectively in an unusable state if any of STDIN_FILENO
* (fd#0), STDOUT_FILENO (fd#1) and STDERR_FILENO (fd#2) don't exist. If they
* exist however, then the...
2023 Mar 23
20
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
V3 was here:
<http://mid.mail-archive.com/20230215141158.2426855-1-lersek at redhat.com>.
See the Notes section on each patch for the v4 updates.
The series is nearly ready for merging: every patch has at least one R-b
tag, except "socket activation: avoid manipulating the sign bit".
The series builds, and passes "make check" and "make check-valgrind", at