Browse Source

Testing

tags/1.9.4
falkTX 11 years ago
parent
commit
65a545710d
1 changed files with 13 additions and 11 deletions
  1. +13
    -11
      source/utils/CarlaPipeUtils.hpp

+ 13
- 11
source/utils/CarlaPipeUtils.hpp View File

@@ -121,6 +121,19 @@ public:
argv[3] = pipeRecv; // reading end
argv[4] = pipeSend; // writting end

// TESTING
{
// set to not close on exec
try {
::fcntl(pipe1[0], F_SETFD, ::fcntl(pipe1[0], F_GETFD) & ~FD_CLOEXEC);
::fcntl(pipe1[1], F_SETFD, ::fcntl(pipe1[1], F_GETFD) & ~FD_CLOEXEC);
::fcntl(pipe2[0], F_SETFD, ::fcntl(pipe2[0], F_GETFD) & ~FD_CLOEXEC);
::fcntl(pipe2[1], F_SETFD, ::fcntl(pipe2[1], F_GETFD) & ~FD_CLOEXEC);
} catch (...) {
fail("failed to set pipe to not close on exec");
}
}

//----------------------------------------------------------------
// fork

@@ -161,17 +174,6 @@ public:
fail("failed to set pipe as non-block");
}

if (ret != -1)
{
// set to not close on exec
try {
ret = ::fcntl(fPipeRecv, F_SETFD, ::fcntl(fPipeRecv, F_GETFD) & ~FD_CLOEXEC);
} catch (...) {
ret = -1;
fail("failed to set pipe to not close on exec");
}
}

//----------------------------------------------------------------
// wait a while for child process to confirm it is alive



Loading…
Cancel
Save