diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2011-10-05 00:11:21 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2011-10-05 00:11:21 +0100 |
commit | e4b75132a31fef25960ea7abbf5dace418b1fc37 (patch) | |
tree | f219c6fcf2ec0d8f1c58102872edf9d347dfa4a6 | |
parent | 6a2b53c22febcbc2041d760dccd795f388bc10c4 (diff) | |
parent | 24cb81b12aa9ab7c351f917fa2027ee251a5be7f (diff) | |
download | xine-lib-e4b75132a31fef25960ea7abbf5dace418b1fc37.tar.gz xine-lib-e4b75132a31fef25960ea7abbf5dace418b1fc37.tar.bz2 |
Merge commits which I've already merged from 1.1...
-rw-r--r-- | src/audio_dec/xine_a52_decoder.c | 2 | ||||
-rw-r--r-- | src/input/input_dvb.c | 4 | ||||
-rw-r--r-- | src/vdr/input_vdr.c | 10 | ||||
-rw-r--r-- | src/xine-engine/xine_private.h | 6 | ||||
-rw-r--r-- | src/xine-utils/utils.c | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/audio_dec/xine_a52_decoder.c b/src/audio_dec/xine_a52_decoder.c index bb0169a21..85e20d1d4 100644 --- a/src/audio_dec/xine_a52_decoder.c +++ b/src/audio_dec/xine_a52_decoder.c @@ -783,7 +783,7 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre this->a52_flags_map[i] |= A52_ADJUST_LEVEL; */ #ifdef DEBUG_A52 - a52file = open ("test.a52", O_CREAT | O_WRONLY | O_TRUNC, 0644); + a52file = xine_create_cloexec("test.a52", O_WRONLY|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); #endif return &this->audio_decoder; } diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index f56e806fd..0fac0290a 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -592,7 +592,7 @@ static tuner_t *XINE_MALLOC tuner_init(xine_t * xine, int adapter) asprintf(&video_device,"/dev/dvb/adapter%i/video0",this->adapter_num); asprintf(&frontend_device,"/dev/dvb/adapter%i/frontend0",this->adapter_num); - if ((this->fd_frontend = open(frontend_device, O_RDWR)) < 0) { + if ((this->fd_frontend = xine_open_cloexec(frontend_device, O_RDWR)) < 0) { xprintf(this->xine, XINE_VERBOSITY_DEBUG, "FRONTEND DEVICE: %s\n", strerror(errno)); tuner_dispose(this); this = NULL; @@ -608,7 +608,7 @@ static tuner_t *XINE_MALLOC tuner_init(xine_t * xine, int adapter) } for (x = 0; x < MAX_FILTERS; x++) { - this->fd_pidfilter[x] = open(this->demux_device, O_RDWR); + this->fd_pidfilter[x] = xine_open_cloexec(this->demux_device, O_RDWR); if (this->fd_pidfilter[x] < 0) { xprintf(this->xine, XINE_VERBOSITY_DEBUG, "DEMUX DEVICE PIDfilter: %s\n", strerror(errno)); tuner_dispose(this); diff --git a/src/vdr/input_vdr.c b/src/vdr/input_vdr.c index ed478c80d..2b0329867 100644 --- a/src/vdr/input_vdr.c +++ b/src/vdr/input_vdr.c @@ -1919,7 +1919,7 @@ static int vdr_plugin_open_fifo_mrl(input_plugin_t *this_gen) filename = strdup(filename); _x_mrl_unescape (filename); - this->fh = open(filename, O_RDONLY | O_NONBLOCK); + this->fh = xine_open_cloexec(filename, O_RDONLY | O_NONBLOCK); lprintf("filename '%s'\n", filename); @@ -1960,7 +1960,7 @@ static int vdr_plugin_open_fifo_mrl(input_plugin_t *this_gen) char *filename_control = 0; asprintf(&filename_control, "%s.control", filename); - this->fh_control = open(filename_control, O_RDONLY); + this->fh_control = xine_open_cloexec(filename_control, O_RDONLY); if (this->fh_control == -1) { xprintf(this->stream->xine, XINE_VERBOSITY_LOG, @@ -1980,7 +1980,7 @@ static int vdr_plugin_open_fifo_mrl(input_plugin_t *this_gen) char *filename_result = 0; asprintf(&filename_result, "%s.result", filename); - this->fh_result = open(filename_result, O_WRONLY); + this->fh_result = xine_open_cloexec(filename_result, O_WRONLY); if (this->fh_result == -1) { perror("failed"); @@ -2002,7 +2002,7 @@ static int vdr_plugin_open_fifo_mrl(input_plugin_t *this_gen) char *filename_event = 0; asprintf(&filename_event, "%s.event", filename); - this->fh_event = open(filename_event, O_WRONLY); + this->fh_event = xine_open_cloexec(filename_event, O_WRONLY); if (this->fh_event == -1) { perror("failed"); @@ -2030,7 +2030,7 @@ static int vdr_plugin_open_socket(vdr_input_plugin_t *this, struct hostent *host struct sockaddr_in sain; struct in_addr iaddr; - if ((fd = socket(PF_INET, SOCK_STREAM, 0)) == -1) + if ((fd = xine_socket_cloexec(PF_INET, SOCK_STREAM, 0)) == -1) { xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("%s: failed to create socket for port %d (%s)\n"), LOG_MODULE, diff --git a/src/xine-engine/xine_private.h b/src/xine-engine/xine_private.h index a4c2a1d4f..a82f6a05f 100644 --- a/src/xine-engine/xine_private.h +++ b/src/xine-engine/xine_private.h @@ -95,10 +95,10 @@ void _x_audio_decoder_shutdown (xine_stream_t *stream) INTERNAL; void xine_probe_fast_memcpy(xine_t *xine) INTERNAL; /** - * @brief make file descriptors and sockets uninheritable + * @brief Make file descriptors and sockets uninheritable */ -int _x_set_file_close_on_exec(int fd) XINE_INTERNAL; +int _x_set_file_close_on_exec(int fd) INTERNAL; -int _x_set_socket_close_on_exec(int s) XINE_INTERNAL; +int _x_set_socket_close_on_exec(int s) INTERNAL; #endif diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index ac89aec14..bc5f1a228 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -38,10 +38,10 @@ #include <pwd.h> #include <sys/types.h> #include <sys/time.h> -#include <sys/socket.h> #include <time.h> #include <unistd.h> #include <fcntl.h> +#include <sys/socket.h> #if HAVE_EXECINFO_H #include <execinfo.h> |