Revert all close-on-exec changes from earlier today
with b26cc125 these are no longer needed.
This commit is contained in:
@@ -52,8 +52,6 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking)
|
||||
return;
|
||||
}
|
||||
}
|
||||
fcntl(fds[0], F_SETFD, fcntl(fds[0], F_GETFD) | FD_CLOEXEC);
|
||||
fcntl(fds[1], F_SETFD, fcntl(fds[1], F_GETFD) | FD_CLOEXEC);
|
||||
}
|
||||
|
||||
CrossThreadChannel::~CrossThreadChannel ()
|
||||
|
||||
@@ -289,9 +289,6 @@ StdioFileDescriptor::open ()
|
||||
/* we must have a lock on the FileManager's mutex */
|
||||
|
||||
_file = fopen (_path.c_str(), _mode.c_str());
|
||||
if (_file) {
|
||||
fcntl(fileno(_file), F_SETFD, fcntl(fileno(_file), F_GETFD) | FD_CLOEXEC);
|
||||
}
|
||||
return (_file == 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,16 +31,6 @@
|
||||
#include "pbd/sndfile_manager.h"
|
||||
#include "pbd/debug.h"
|
||||
|
||||
/*
|
||||
* Neat solution to the Win32/OS2 binary file flage requirement.
|
||||
* If O_BINARY isn't already defined by the inclusion of the system
|
||||
* headers, set it to zero.
|
||||
*/
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace PBD;
|
||||
|
||||
@@ -99,32 +89,8 @@ bool
|
||||
SndFileDescriptor::open ()
|
||||
{
|
||||
/* we must have a lock on the FileManager's mutex */
|
||||
|
||||
int fd, oflag, mode ;
|
||||
|
||||
if (_writeable) {
|
||||
oflag = O_RDWR | O_CREAT | O_BINARY ;
|
||||
mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ;
|
||||
} else {
|
||||
oflag = O_RDONLY | O_BINARY ;
|
||||
mode = 0 ;
|
||||
}
|
||||
|
||||
if (mode == 0) {
|
||||
fd = ::open (_path.c_str(), oflag) ;
|
||||
} else {
|
||||
fd = ::open (_path.c_str(), oflag, mode) ;
|
||||
}
|
||||
|
||||
if (fd == -1) return false;
|
||||
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
||||
|
||||
_sndfile = sf_open_fd (fd, _writeable ? SFM_RDWR : SFM_READ, _info, 1);
|
||||
|
||||
if (_sndfile == 0) {
|
||||
::close(fd);
|
||||
}
|
||||
|
||||
|
||||
_sndfile = sf_open (_path.c_str(), _writeable ? SFM_RDWR : SFM_READ, _info);
|
||||
return (_sndfile == 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user