Displaying 2 results from an estimated 2 matches for "a43eeb71".
2020 Apr 15
0
[PATCH nbdkit 6/9] common/utils: Add a copy_environ utility function.
...xit_status_to_nbd_error (int status, const char *cmd);
extern int set_cloexec (int fd);
extern int set_nonblock (int fd);
+extern char **copy_environ (char **env, ...);
#endif /* NBDKIT_UTILS_H */
diff --git a/common/utils/environ.c b/common/utils/environ.c
new file mode 100644
index 00000000..a43eeb71
--- /dev/null
+++ b/common/utils/environ.c
@@ -0,0 +1,116 @@
+/* nbdkit
+ * Copyright (C) 2018-2020 Red Hat Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions o...
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.