Displaying 3 results from an estimated 3 matches for "31bc3d4".
2019 Sep 30
0
[PATCH libnbd v2 1/2] lib: Don't use perror after fork in nbd_connect_callback.
...vp (h->argv[0], h->argv);
- perror (h->argv[0]);
- _exit (EXIT_FAILURE);
+ nbd_internal_fork_safe_perror (h->argv[0]);
+ if (errno == ENOENT)
+ _exit (127);
+ else
+ _exit (126);
}
/* Parent. */
diff --git a/lib/internal.h b/lib/internal.h
index bdb0e83..31bc3d4 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -384,5 +384,7 @@ extern void nbd_internal_hexdump (const void *data, size_t len, FILE *fp);
extern size_t nbd_internal_string_list_length (char **argv);
extern char **nbd_internal_copy_string_list (char **argv);
extern void nbd_internal_free_st...
2019 Sep 30
4
[PATCH libnbd v2 0/2] Implement systemd socket activation.
v1 was posted here:
https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00337
v2:
- Drop the first patch.
- Hopefully fix the multiple issues with fork-safety and general
behaviour on error paths.
Note this requires execvpe for which there seems to be no equivalent
on FreeBSD, except some kind of tedious path parsing (but can we
assign to environ?)
Rich.
2019 Sep 30
0
[PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
...id, SIGTERM);
+ unlink (h->sa_sockpath);
+ free (h->sa_sockpath);
+ }
+ if (h->sa_tmpdir) {
+ rmdir (h->sa_tmpdir);
+ free (h->sa_tmpdir);
+ }
free (h->unixsocket);
free (h->hostname);
free (h->port);
diff --git a/lib/internal.h b/lib/internal.h
index 31bc3d4..6433183 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -188,6 +188,12 @@ struct nbd_handle {
char **argv;
pid_t pid;
+ /* When using systemd socket activation, this directory and socket
+ * must be deleted, and the pid above must be killed.
+ */
+ char *sa_tmpdir;
+ char *sa_so...