Browse Source

Only use syncfs on linux and hurd

tags/v1.9.11
falkTX 6 years ago
parent
commit
cee75f5b3f
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      source/utils/CarlaPipeUtils.cpp

+ 7
- 3
source/utils/CarlaPipeUtils.cpp View File

@@ -937,15 +937,19 @@ bool CarlaPipeCommon::flushMessages() const noexcept
{
CARLA_SAFE_ASSERT_RETURN(pData->pipeSend != INVALID_PIPE_VALUE, false);

#ifdef CARLA_OS_WIN
// FIXME
#if defined(CARLA_OS_LINUX) || defined(CARLA_OS_GNU_HURD)
// the only call that seems to do something
return ::syncfs(pData->pipeSend) == 0;
#elif defined(CARLA_OS_WIN)
// FIXME causes issues
return true;

try {
return (::FlushFileBuffers(pData->pipeSend) != FALSE);
} CARLA_SAFE_EXCEPTION_RETURN("CarlaPipeCommon::writeMsgBuffer", false);
#else
return ::syncfs(pData->pipeSend) == 0;
// unsupported
return true;
#endif

}


Loading…
Cancel
Save