From 4cce87557feb6933c284d234c448bd8bde4facae Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 9 Sep 2023 03:55:38 +0000 Subject: cspawn revamp, part 1. Prepare for 2.14.0.0. Signed-off-by: Laurent Bercot --- NEWS | 6 +- doc/index.html | 2 +- doc/upgrade.html | 7 +- package/deps.mak | 33 ++-- package/info | 2 +- src/include/skalibs/cspawn.h | 81 ++++++++ src/include/skalibs/djbunix.h | 50 ----- src/include/skalibs/stddjb.h | 1 + src/libstddjb/child_spawn.c | 198 +++---------------- src/libstddjb/child_spawn0.c | 101 +--------- src/libstddjb/child_spawn1_internal.c | 131 +----------- src/libstddjb/child_spawn1_pipe.c | 5 +- src/libstddjb/child_spawn1_socket.c | 4 +- src/libstddjb/child_spawn2.c | 149 +------------- src/libstddjb/child_spawn3.c | 175 ++-------------- src/libstddjb/child_spawn_workaround.c | 55 ------ src/libstddjb/cspawn-internal.h | 10 + src/libstddjb/cspawn.c | 220 +++++++++++++++++++++ src/libstddjb/cspawn_workaround.c | 55 ++++++ src/libstddjb/djbunix-internal.h | 10 - src/libstddjb/openslurpclose.c | 8 - src/libstddjb/slurp.c | 8 - src/libunixonacid/skaclient_startf_async.c | 1 + src/libunixonacid/textclient_server_init.c | 3 +- .../textclient_server_init_frompipe.c | 2 +- src/libunixonacid/textclient_startf.c | 2 +- 26 files changed, 463 insertions(+), 856 deletions(-) create mode 100644 src/include/skalibs/cspawn.h delete mode 100644 src/libstddjb/child_spawn_workaround.c create mode 100644 src/libstddjb/cspawn-internal.h create mode 100644 src/libstddjb/cspawn.c create mode 100644 src/libstddjb/cspawn_workaround.c delete mode 100644 src/libstddjb/djbunix-internal.h delete mode 100644 src/libstddjb/openslurpclose.c delete mode 100644 src/libstddjb/slurp.c diff --git a/NEWS b/NEWS index 905712f..a9b4995 100644 --- a/NEWS +++ b/NEWS @@ -6,8 +6,10 @@ In 2.13.2.0 - Bugfixes. - New accessor function: selfpipe_fd(). - New functions: slurpn(), openslurpnclose(). - - New strerr macros to warn with a "fatal" message - - New cdb functions: cdb_hashv(), cdbmake_addv() + - slurp() and openslurpclose() are now macros. + - New strerr macros to warn with a "fatal" message. + - New cdb functions: cdb_hashv(), cdbmake_addv(). + - child_spawn() revamp. Prototype change (last arg is a size_t). In 2.13.1.1 diff --git a/doc/index.html b/doc/index.html index 7b7ce35..ae3e433 100644 --- a/doc/index.html +++ b/doc/index.html @@ -60,7 +60,7 @@ with a standard C development environment

Download