Displaying 20 results from an estimated 31 matches for "socket_activated".
2025 Apr 16
2
[PATCH] ssh-agent: exit 0 from SIGTERM under systemd socket-activation
...---
ssh-agent.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ssh-agent.c b/ssh-agent.c
index 55b9f44f4..9617e6ee0 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -2238,6 +2238,7 @@ main(int ac, char **av)
size_t npfd = 0;
u_int maxfds;
sigset_t nsigset, osigset;
+ int socket_activated = 0;
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();
@@ -2389,6 +2390,7 @@ main(int ac, char **av)
fatal("bad LISTEN_PID: %d vs pid %d", pid, getpid());
debug("using socket activation on fd=3");
sock = 3;
+ socket_activated =...
2017 Jan 31
0
[PATCH nbdkit] Add support for socket activation.
Socket activation (aka systemd socket activation) is a simple protocol
that lets you pass in an opened, listening socket to a server.
Supporting socket activation allows you to use a modern superserver to
serve infrequent NBD requests without needing nbdkit to be running the
whole time.
Although the protocol was invented by systemd, it has been implemented
in a few other places, and the protocol
2018 Jun 28
1
[nbdkit PATCH] main: More idiomatic use of getopt_long
Prefer named constants over magic numbers in the 'struct option'
list, and expand the list of enums for long-only options so that
the call to getopt_long() can switch directly to every option,
rather than needing a lengthy if/else chain that grows for every
new long option.
Patch best viewed with whitespace changes ignored.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
2020 Mar 23
0
[PATCH nbdkit 2/3] server: Inject API functions for Windows
From: Yifan Gu <gyf304@gmail.com>
Windows PE DLL needs function indirection, this patch injects API
functions for plugins / filters if on Windows.
Note that nbdkit_peer_name is explicitly disabled due to potential ABI
incompatibilities.
---
server/main.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/server/main.c b/server/main.c
2020 Apr 14
0
[nbdkit PATCH v2 2/3] server: Sanitize stdin/out before running plugin code
As shown in the previous patch, plugins may choose to use stdin or
stdout during .config. But from .get_ready onwards, well-written
plugins shouldn't be needing any further use of stdin/out. We already
swapped stdin/out to /dev/null while daemonizing, but did not do do
during -f or --run, which leads to some surprising inconsistency when
trying to debug a plugin that works in the foreground
2020 Apr 04
0
[nbdkit PATCH 2/2] server: Sanitize stdin/out before running plugin code
As shown in the previous patch, plugins may choose to use stdin or
stdout during .config. But from .get_ready onwards, well-written
plugins shouldn't be needing any further use of stdin/out. We already
swapped stdin/out to /dev/null while daemonizing, but did not do do
during -f or --run, which leads to some surprising inconsistency when
trying to debug a plugin that works in the foreground
2017 Nov 17
0
[nbdkit PATCH 6/6] Add --threads option for supporting true parallel requests
It's finally time to implement one of the TODO items: we want to
support a thread pool of parallel readers from the client, in
order to allow multiple in-flight operations with potential
out-of-order completion. We also need at least one plugin that
supports parallel processing for testing the option; the file
plugin fits the bill.
Add and document a new command line option, -t/--threads=N,
2020 Oct 01
2
[PATCH libnbd] interop: Add test of qemu-storage-daemon.
This commit adds a simple test of qemu-storage-daemon (QSD). On the
basis that QSD is just qemu-nbd in new clothes this is only a simple
test, not complete coverage. Nor does it test the unique features of
QSD like being able to use QMP to create new server instances.
Unfortunately QSD is not yet stable upstream. This version works with
qemu 5.1.0 but at least two of the command line
2019 Oct 01
3
[PATCH libnbd 0/2] Change qemu-nbd interop tests to use socket activation.
Now that we have implemented systemd socket activation, we can use
this to run qemu-nbd in tests.
The first patch leaves some dead code around (the -DSERVE_OVER_TCP=1
path). It's possible we might want to use this to test against a
putative future NBD server that only supports TCP, but on the other
hand maybe we should just remove it.
Tests & valgrind still pass for me.
Rich.
2019 Oct 18
0
[PATCH nbdkit] Add support for AF_VSOCK.
On platforms which support it (only Linux currently) nbdkit can act as
a vsock server. Guests running on the host see a raw NBD socket which
it can connect to by opening an AF_VSOCK connection. (Although only
libnbd supports this).
The current limitations are:
* nbdkit can only act as a host (cid == VMADDR_CID_HOST == 2).
* There is no access control. Any guest which has vsock enabled can
2019 Oct 18
1
[PATCH nbdkit v2] Add support for AF_VSOCK.
v1 was discussed here:
https://www.redhat.com/archives/libguestfs/2019-October/thread.html#00100
v2:
- Bind to VMADDR_CID_ANY (instead of HOST) and update the
documentation accordingly.
- Don't bother with SOCK_CLOEXEC fallback path that can
never be used.
Rich.
2020 Apr 04
6
[nbdkit PATCH 0/2] stdin/out cleanups
This is what I've been playing with in response to my earlier question
about what to do with 'nbdkit -s sh -'
(https://www.redhat.com/archives/libguestfs/2020-April/msg00032.html)
I'm still open to ideas on a better name, and/or whether adding
<stdbool.h> to our public include files is a good idea (if not,
returning int instead of bool is tolerable).
Eric Blake (2):
2019 Jan 01
2
[PATCH nbdkit] server: Use bool for types which are really booleans.
For mainly historical reasons we tended to use int to store boolean
values. However using bool is probably safer in some corner cases
(eg. ?v == true? can fail badly if v is an int, but works for bool).
bool was added in C99 so let's use it.
---
server/internal.h | 16 +++++------
server/connections.c | 28 +++++++++---------
server/crypto.c | 4 +--
server/main.c | 67
2019 Oct 18
2
[PATCH nbdkit] 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
2017 Feb 03
5
[PATCH 0/5] Support socket activation in virt-p2v.
As the subject says, support socket activation in virt-p2v.
I have added upstream support for socket activation to nbdkit already:
https://github.com/libguestfs/nbdkit/commit/7ff39d028c6359f5c0925ed2cf4a2c4c751af2e4
I posted a patch for qemu-nbd, still waiting on more reviews for that
one:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg427246.html
I tested this against old and new qemu
2017 Nov 20
10
[nbdkit PATCH v2 0/8] Support parallel transactions within single connection
I've posted some of these patches or ideas before; but now I'm
confident enough with the series that it should be ready to push;
at any rate, I can now run test-socket-activation in a tight loop
without triggering any crashes or hangs.
With this in place, I'm going back to work on making the nbd
forwarder wort with the parallel thread model.
Eric Blake (8):
sockets: Use
2020 Mar 23
6
[PATCH nbdkit 0/3] msys2 support for review
I pushed a few of the msys2 patches upstream. I changed the way that
$(SHARED_LDFLAGS) works so it's more to my liking, and the others were
pushed unchanged. Three patches remain which I'm posting on the
mailing list for proper review.
Rich.
2019 Oct 04
4
[PATCH libnbd 1/4] generator: Allow long ‘name - shortdesc’ in man pages.
For commands with long names and/or short descriptors, you can end up
going over 72 characters in the first line of the man page (causing
podwrapper to complain). Wrap these lines.
---
generator/generator | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/generator/generator b/generator/generator
index 7d3f656..ad1cb6b 100755
--- a/generator/generator
+++ b/generator/generator
2018 Jan 17
0
[PATCH 7/9] Implement filters.
Also implements the --filters parameter.
---
docs/nbdkit.pod | 21 +-
nbdkit.in | 17 +-
src/Makefile.am | 1 +
src/filters.c | 606 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/internal.h | 23 ++-
src/main.c | 114 +++++++++--
src/plugins.c | 11 +-
7 files changed, 772 insertions(+), 21 deletions(-)
diff --git a/docs/nbdkit.pod b/docs/nbdkit.pod
index
2020 Apr 14
6
[nbdkit PATCH v2 0/3] more consistent stdin/out handling
In v2:
- use int instead of bool in the public header
- split the tests from the code
- don't overload test-layers; instead, add new tests
- add a missing fflush exposed by the new tests
- other minor cleanups
Eric Blake (3):
server: Add nbdkit_stdio_safe
server: Sanitize stdin/out before running plugin code
server: More tests of stdin/out handling
docs/nbdkit-plugin.pod |