mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Revert all close-on-exec changes from earlier today
with b26cc125 these are no longer needed.
This commit is contained in:
parent
b26cc12513
commit
4cb31ef74e
7 changed files with 4 additions and 61 deletions
|
|
@ -110,9 +110,6 @@ Butler::start_thread()
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fcntl(request_pipe[0], F_SETFD, fcntl(request_pipe[0], F_GETFD) | FD_CLOEXEC);
|
|
||||||
fcntl(request_pipe[1], F_SETFD, fcntl(request_pipe[1], F_GETFD) | FD_CLOEXEC);
|
|
||||||
|
|
||||||
//pthread_detach (thread);
|
//pthread_detach (thread);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,6 @@ rdff_open(const char* path, bool write)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fcntl(fileno(fd), F_SETFD, fcntl(fileno(fd), F_GETFD) | FD_CLOEXEC);
|
|
||||||
|
|
||||||
RDFF ret = (RDFF)malloc(sizeof(struct _RDFF));
|
RDFF ret = (RDFF)malloc(sizeof(struct _RDFF));
|
||||||
ret->fd = fd;
|
ret->fd = fd;
|
||||||
ret->size = size;
|
ret->size = size;
|
||||||
|
|
|
||||||
|
|
@ -160,8 +160,6 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
fcntl(sockin, F_SETFD, fcntl(sockin, F_GETFD) | FD_CLOEXEC);
|
|
||||||
|
|
||||||
struct sockaddr_in addrin;
|
struct sockaddr_in addrin;
|
||||||
::memset(&addrin, 0, sizeof(addrin));
|
::memset(&addrin, 0, sizeof(addrin));
|
||||||
addrin.sin_family = AF_INET;
|
addrin.sin_family = AF_INET;
|
||||||
|
|
@ -209,8 +207,6 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
fcntl(sockout, F_SETFD, fcntl(sockout, F_GETFD) | FD_CLOEXEC);
|
|
||||||
|
|
||||||
// Will Hall, Oct 2007
|
// Will Hall, Oct 2007
|
||||||
if (!ifname.empty()) {
|
if (!ifname.empty()) {
|
||||||
struct in_addr if_addr_out;
|
struct in_addr if_addr_out;
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,6 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking)
|
||||||
return;
|
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 ()
|
CrossThreadChannel::~CrossThreadChannel ()
|
||||||
|
|
|
||||||
|
|
@ -289,9 +289,6 @@ StdioFileDescriptor::open ()
|
||||||
/* we must have a lock on the FileManager's mutex */
|
/* we must have a lock on the FileManager's mutex */
|
||||||
|
|
||||||
_file = fopen (_path.c_str(), _mode.c_str());
|
_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);
|
return (_file == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,16 +31,6 @@
|
||||||
#include "pbd/sndfile_manager.h"
|
#include "pbd/sndfile_manager.h"
|
||||||
#include "pbd/debug.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 std;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
|
|
@ -100,31 +90,7 @@ SndFileDescriptor::open ()
|
||||||
{
|
{
|
||||||
/* we must have a lock on the FileManager's mutex */
|
/* we must have a lock on the FileManager's mutex */
|
||||||
|
|
||||||
int fd, oflag, mode ;
|
_sndfile = sf_open (_path.c_str(), _writeable ? SFM_RDWR : SFM_READ, _info);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (_sndfile == 0);
|
return (_sndfile == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,9 +171,6 @@ OSC::start ()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fd = lo_server_get_socket_fd (_osc_server);
|
|
||||||
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
|
||||||
|
|
||||||
#ifdef ARDOUR_OSC_UNIX_SERVER
|
#ifdef ARDOUR_OSC_UNIX_SERVER
|
||||||
|
|
||||||
// APPEARS sluggish for now
|
// APPEARS sluggish for now
|
||||||
|
|
@ -181,7 +178,7 @@ OSC::start ()
|
||||||
// attempt to create unix socket server too
|
// attempt to create unix socket server too
|
||||||
|
|
||||||
snprintf(tmpstr, sizeof(tmpstr), "/tmp/sooperlooper_XXXXXX");
|
snprintf(tmpstr, sizeof(tmpstr), "/tmp/sooperlooper_XXXXXX");
|
||||||
fd = mkstemp(tmpstr);
|
int fd = mkstemp(tmpstr);
|
||||||
|
|
||||||
if (fd >= 0 ) {
|
if (fd >= 0 ) {
|
||||||
unlink (tmpstr);
|
unlink (tmpstr);
|
||||||
|
|
@ -191,8 +188,6 @@ OSC::start ()
|
||||||
|
|
||||||
if (_osc_unix_server) {
|
if (_osc_unix_server) {
|
||||||
_osc_unix_socket_path = tmpstr;
|
_osc_unix_socket_path = tmpstr;
|
||||||
fd = lo_server_get_socket_fd (_osc_unix_server)
|
|
||||||
fcntl(fdx, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -232,23 +227,19 @@ OSC::thread_init ()
|
||||||
pthread_set_name (X_("OSC"));
|
pthread_set_name (X_("OSC"));
|
||||||
|
|
||||||
if (_osc_unix_server) {
|
if (_osc_unix_server) {
|
||||||
const int fd = lo_server_get_socket_fd (_osc_unix_server);
|
|
||||||
Glib::RefPtr<IOSource> src = IOSource::create (lo_server_get_socket_fd (_osc_unix_server), IO_IN|IO_HUP|IO_ERR);
|
Glib::RefPtr<IOSource> src = IOSource::create (lo_server_get_socket_fd (_osc_unix_server), IO_IN|IO_HUP|IO_ERR);
|
||||||
src->connect (sigc::bind (sigc::mem_fun (*this, &OSC::osc_input_handler), _osc_unix_server));
|
src->connect (sigc::bind (sigc::mem_fun (*this, &OSC::osc_input_handler), _osc_unix_server));
|
||||||
src->attach (_main_loop->get_context());
|
src->attach (_main_loop->get_context());
|
||||||
local_server = src->gobj();
|
local_server = src->gobj();
|
||||||
g_source_ref (local_server);
|
g_source_ref (local_server);
|
||||||
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_osc_server) {
|
if (_osc_server) {
|
||||||
const int fd = lo_server_get_socket_fd (_osc_server);
|
Glib::RefPtr<IOSource> src = IOSource::create (lo_server_get_socket_fd (_osc_server), IO_IN|IO_HUP|IO_ERR);
|
||||||
Glib::RefPtr<IOSource> src = IOSource::create (fd, IO_IN|IO_HUP|IO_ERR);
|
|
||||||
src->connect (sigc::bind (sigc::mem_fun (*this, &OSC::osc_input_handler), _osc_server));
|
src->connect (sigc::bind (sigc::mem_fun (*this, &OSC::osc_input_handler), _osc_server));
|
||||||
src->attach (_main_loop->get_context());
|
src->attach (_main_loop->get_context());
|
||||||
remote_server = src->gobj();
|
remote_server = src->gobj();
|
||||||
g_source_ref (remote_server);
|
g_source_ref (remote_server);
|
||||||
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PBD::notify_gui_about_thread_creation (X_("gui"), pthread_self(), X_("OSC"), 2048);
|
PBD::notify_gui_about_thread_creation (X_("gui"), pthread_self(), X_("OSC"), 2048);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue