mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-16 06:08:15 +00:00
Fix for GitHub issue #97
This commit is contained in:
@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user