mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Make sure open() has third argument
This commit is contained in:
parent
8d2e20ede6
commit
73dd9d3b74
1 changed files with 2 additions and 2 deletions
|
@ -58,11 +58,11 @@ const char Utils::HEXCHARS[16] = { '0','1','2','3','4','5','6','7','8','9','a','
|
||||||
bool Utils::redirectUnixOutputs(const char *stdoutPath,const char *stderrPath)
|
bool Utils::redirectUnixOutputs(const char *stdoutPath,const char *stderrPath)
|
||||||
throw()
|
throw()
|
||||||
{
|
{
|
||||||
int fdout = ::open(stdoutPath,O_WRONLY|O_CREAT);
|
int fdout = ::open(stdoutPath,O_WRONLY|O_CREAT,0600);
|
||||||
if (fdout > 0) {
|
if (fdout > 0) {
|
||||||
int fderr;
|
int fderr;
|
||||||
if (stderrPath) {
|
if (stderrPath) {
|
||||||
fderr = ::open(stderrPath,O_WRONLY|O_CREAT);
|
fderr = ::open(stderrPath,O_WRONLY|O_CREAT,0600);
|
||||||
if (fderr <= 0) {
|
if (fderr <= 0) {
|
||||||
::close(fdout);
|
::close(fdout);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue