Displaying 2 results from an estimated 2 matches for "stdio_safe_str".
2020 Apr 15
0
[PATCH nbdkit 9/9] eval, sh: Define $nbdkit_safe_stdio = 0|1 in scripts.
...index b0aaf754..ddb7045b 100644
--- a/plugins/sh/call.c
+++ b/plugins/sh/call.c
@@ -107,6 +107,7 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin */
{
const char *argv0 = argv[0]; /* script name, used in error messages */
CLEANUP_FREE_STRING_LIST char **env = NULL;
+ const char *stdio_safe_str = nbdkit_stdio_safe () ? "1" : "0";
pid_t pid = -1;
int status;
int ret = ERROR;
@@ -123,8 +124,11 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin */
debug_call (argv);
- /* Copy the environment, and add $tmpdir. */
- env = copy_environ (environ, &...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated!
The basic purpose of the patch series is to set $nbdkit_stdio_safe to
"0" or "1" in sh and eval plugin scripts.
To do that, I ended up adding a nicer way to manipulate environ lists,
and to do that, I ended up adding a whole generic vector
implementation which is applicable in a lot of different places.