From 07491df186d562d0efa6a7fca2b7f8d07dbd0652 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 23 Dec 2019 13:05:25 +0000 Subject: Make execline dependency optional This includes: - adding a configure option to disable execline support - duplicating el_semicolon() and el_getstrict() into the s6 library when execline is disabled at build time, making a compat shim and using it where needed (s6-svlisten, s6-ftrig-listen) - Creating alternatives for execlineb script spawning: * s6-log: '?' directive (done in the previous commit) * s6-notifyoncheck: require hardcoding the check in ./data/check * s6-ipcserver-access: no support for exec files, add a warning - Updating the relevant parts of the doc --enable-execline will remain the default, and whiners can choke on their tears. --- src/conn-tools/s6-ipcserver-access.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/conn-tools') diff --git a/src/conn-tools/s6-ipcserver-access.c b/src/conn-tools/s6-ipcserver-access.c index 9d78620..e3f6ac2 100644 --- a/src/conn-tools/s6-ipcserver-access.c +++ b/src/conn-tools/s6-ipcserver-access.c @@ -11,9 +11,14 @@ #include #include #include -#include + +#include #include +#ifdef S6_USE_EXECLINE +#include +#endif + #define USAGE "s6-ipcserver-access [ -v verbosity ] [ -e | -E ] [ -l localname ] [ -i rulesdir | -x rulesfile ] prog..." static unsigned int verbosity = 1 ; @@ -204,9 +209,13 @@ int main (int argc, char const *const *argv, char const *const *envp) } if (params.exec.len) +#ifdef S6_USE_EXECLINE { char *specialargv[4] = { EXECLINE_EXTBINPREFIX "execlineb", "-Pc", params.exec.s, 0 } ; xpathexec_r((char const *const *)specialargv, envp, env_len(envp), params.env.s, params.env.len) ; } - else xpathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ; +#else + strerr_warnw1x("exec file found but ignored because s6 was compiled without execline support!") ; +#endif + xpathexec_r(argv, envp, env_len(envp), params.env.s, params.env.len) ; } -- cgit v1.2.3