similar to: [libnbd PATCH v4 0/3] lib/utils: add async-signal-safe assert()

Displaying 20 results from an estimated 3000 matches similar to: "[libnbd PATCH v4 0/3] lib/utils: add async-signal-safe assert()"

2023 Feb 20
2
[libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert()
On 2/15/23 21:57, Eric Blake wrote: > On Wed, Feb 15, 2023 at 03:11:36PM +0100, Laszlo Ersek wrote: >> Add an assert() variant that we may call between fork() and exec*(). >> >> Signed-off-by: Laszlo Ersek <lersek at redhat.com> >> --- >> > >> +++ b/lib/internal.h > >> + >> +#ifdef NDEBUG >> +#define
2023 Feb 15
1
[libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert()
On Wed, Feb 15, 2023 at 03:11:36PM +0100, Laszlo Ersek wrote: > Add an assert() variant that we may call between fork() and exec*(). > > Signed-off-by: Laszlo Ersek <lersek at redhat.com> > --- > > +++ b/lib/internal.h > + > +#ifdef NDEBUG > +#define NBD_INTERNAL_FORK_SAFE_ASSERT(expression) ((void)0) May be affected by outcome of side discussion on 01/29
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
2023 Mar 16
1
[libnbd PATCH v4 3/3] lib/utils: add unit test for async-signal-safe assert()
On 3/15/23 18:25, Eric Blake wrote: > On Wed, Mar 15, 2023 at 12:01:57PM +0100, Laszlo Ersek wrote: >> Don't try to test async-signal-safety, only that >> NBD_INTERNAL_FORK_SAFE_ASSERT() works similarly to assert(): >> >> - it prints diagnostics to stderr, >> >> - it calls abort(). >> >> Some unfortunate gymnastics are necessary to avoid
2023 Mar 19
3
[libnbd PATCH v4 0/2] lib/utils: introduce async-signal-safe execvpe()
This is version 4 of the following sub-series: [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe() [libnbd PATCH v3 10/29] lib/utils: add unit tests for async-signal-safe execvpe() http://mid.mail-archive.com/20230215141158.2426855-10-lersek at redhat.com http://mid.mail-archive.com/20230215141158.2426855-11-lersek at redhat.com The Notes section on each patch records the
2023 Feb 24
1
[libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert()
On 2/21/23 07:33, Laszlo Ersek wrote: > On 2/20/23 19:21, Laszlo Ersek wrote: >> On 2/15/23 21:57, Eric Blake wrote: >>> On Wed, Feb 15, 2023 at 03:11:36PM +0100, Laszlo Ersek wrote: > >>>> + >>>> + xwrite (STDERR_FILENO, file, strlen (file)); >>>> + xwrite (STDERR_FILENO, ":", 1); >>> >>> Presumably, if our
2023 Feb 15
1
[libnbd PATCH v3 13/29] socket activation: avoid manipulating the sign bit
F_SETFD takes an "int", so it stands to reason that FD_CLOEXEC expands to an "int". In turn, it's bad hygiene to manipulate the sign bit of (signed) integers with bit operations: ~FD_CLOEXEC Convert FD_CLOEXEC to "unsigned int" for the bitwise complement operator: ~(unsigned)FD_CLOEXEC The bitwise complement then results in an "unsigned int".
2023 Mar 23
1
[libnbd PATCH v3 07/19] socket activation: replace execvp() call with fork-safe variant
Per POSIX, execvp() is not safe to call in a child process forked from a multi-threaded process. We can now replace the execvp() call in the child process with a call to our fork-safe (async-signal-safe) variant. Prepare our internal execvpe context on the parent's construction path, use the context in the child, and release the context in the parent on the way out, regardless of whether the
2023 Mar 20
1
[libnbd PATCH v4 0/2] lib/utils: introduce async-signal-safe execvpe()
On Sun, Mar 19, 2023 at 10:41:37AM +0100, Laszlo Ersek wrote: > This is version 4 of the following sub-series: > > [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe() > [libnbd PATCH v3 10/29] lib/utils: add unit tests for async-signal-safe execvpe() > > http://mid.mail-archive.com/20230215141158.2426855-10-lersek at redhat.com >
2023 Mar 23
1
[libnbd PATCH v3 14/19] CONNECT_COMMAND.START: plug child process leak on error
A prior patch highlighted the following leak: when any construction step fails in the parent after fork(), the child process is leaked. We could plug the leak by inserting a new error handling section for killing the child process and reaping it with waitpid(). However, it would raise some new questions (what signal to send, ensure the child not ignore that signal, hope that whatever process
2023 Feb 21
1
[libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert()
On 2/20/23 19:21, Laszlo Ersek wrote: > On 2/15/23 21:57, Eric Blake wrote: >> On Wed, Feb 15, 2023 at 03:11:36PM +0100, Laszlo Ersek wrote: >>> + >>> + xwrite (STDERR_FILENO, file, strlen (file)); >>> + xwrite (STDERR_FILENO, ":", 1); >> >> Presumably, if our first best-effort xwrite() fails to produce full >> output, all later
2023 Mar 17
1
[libnbd PATCH v4 3/3] lib/utils: add unit test for async-signal-safe assert()
On Thu, Mar 16, 2023 at 10:50:06AM +0100, Laszlo Ersek wrote: > On 3/15/23 18:25, Eric Blake wrote: > > On Wed, Mar 15, 2023 at 12:01:57PM +0100, Laszlo Ersek wrote: > >> Don't try to test async-signal-safety, only that > >> NBD_INTERNAL_FORK_SAFE_ASSERT() works similarly to assert(): > >> > >> - it prints diagnostics to stderr, > >> >
2023 Mar 25
4
[libnbd PATCH v5 0/4] pass LISTEN_FDNAMES with systemd socket activation
V4 was here (incorrectly versioned on the mailing list as v3): <http://mid.mail-archive.com/20230323121016.1442655-1-lersek at redhat.com>. See the Notes section on each patch for the v5 updates. Laszlo Ersek (2): socket activation: generalize environment construction socket activation: set LISTEN_FDNAMES Richard W.M. Jones (2): common/include: Copy ascii-ctype functions from nbdkit
2023 Mar 23
1
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
On 3/23/23 13:09, Laszlo Ersek wrote: > V3 was here: > <http://mid.mail-archive.com/20230215141158.2426855-1-lersek at redhat.com>. Meh, *this* version is of course v4. I updated everything in my git-format-series command line, from my bash history, from the time of posting v3, *except* of course the "-v3" option... Laszlo
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.
2023 Mar 28
1
libnbd | Failed pipeline for master | 2db30279
Pipeline #819889104 has failed! Project: libnbd ( https://gitlab.com/nbdkit/libnbd ) Branch: master ( https://gitlab.com/nbdkit/libnbd/-/commits/master ) Commit: 2db30279 ( https://gitlab.com/nbdkit/libnbd/-/commit/2db30279bad4f9923baa541008f5da11624d2d1f ) Commit Message: socket activation: set LISTEN_FDNAMES Add LIST... Commit Author: Laszlo Ersek ( https://gitlab.com/lersek ) Pipeline
2023 Feb 15
3
[libnbd PATCH v3 04/29] ocaml: rename "sa_u" to "saddr_u"
<signal.h> in POSIX reserves the "sa_" prefix: https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02 Let's use "saddr_" instead. Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- ocaml/helpers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ocaml/helpers.c b/ocaml/helpers.c index
2023 Feb 15
2
[libnbd PATCH v3 11/29] socket activation: fix error message upon asprintf() failure
Correctly report "asprintf" in the error message when asprintf() fails. Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- generator/states-connect-socket-activation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/states-connect-socket-activation.c b/generator/states-connect-socket-activation.c index 3b621b8be44f..c46a0bf5c0a3 100644 ---
2023 Apr 14
4
[libnbd PATCH 0/4] copy: wrap source code at 80 characters
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516 I figured I'd work on the libnbd line wrapping in shorter waves than how long the nbdkit patch series was. Laszlo Laszlo Ersek (4): copy: rename (LONG|SHORT)_OPTIONS to (LONG|SHORT)_OPTIONS_OPTION copy: rename <purpose>_OPTION to OPT_<purpose> copy: fix layout of "long_options" table copy: rewrap
2023 Feb 15
2
[libnbd PATCH v3 02/29] generator/C.ml: use space consistently in func. and func.-like macro calls
Apply the ideas in the previous patch to the C-language bindings generator. Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- generator/C.ml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/generator/C.ml b/generator/C.ml index f9171996dde0..07c924c48ccf 100644 --- a/generator/C.ml +++ b/generator/C.ml @@ -250,15 +250,15 @@ let *)