summaryrefslogtreecommitdiff
path: root/node/Utils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Utils.hpp')
-rw-r--r--node/Utils.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/node/Utils.hpp b/node/Utils.hpp
index bafe0b39..91620d78 100644
--- a/node/Utils.hpp
+++ b/node/Utils.hpp
@@ -58,6 +58,21 @@ namespace ZeroTier {
class Utils
{
public:
+#ifdef __UNIX_LIKE__
+ /**
+ * Close STDOUT_FILENO and STDERR_FILENO and replace them with output to given path
+ *
+ * This can be called after fork() and prior to exec() to suppress output
+ * from a subprocess, such as auto-update.
+ *
+ * @param stdoutPath Path to file to use for stdout
+ * @param stderrPath Path to file to use for stderr, or NULL for same as stdout (default)
+ * @return True on success
+ */
+ static bool redirectUnixOutputs(const char *stdoutPath,const char *stderrPath = (const char *)0)
+ throw();
+#endif
+
/**
* Perform a time-invariant binary comparison
*