diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-10-30 04:54:19 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-10-30 04:54:19 +0100 |
commit | 168be3830ae291dd819abebec813f76151487bb3 (patch) | |
tree | 783df8db52cac54b74d8e304d98e7ab5e4683bd8 /src/pulsecore/core-util.c | |
parent | 88b72958bebd1770e45a4af2dc9fec75aaf1f2de (diff) |
use pa_fopen_cloexec() where applicable
Diffstat (limited to 'src/pulsecore/core-util.c')
-rw-r--r-- | src/pulsecore/core-util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 40da8f42..738bf065 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -1600,7 +1600,7 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env fn = buf; #endif - if ((f = fopen(fn, "r"))) { + if ((f = pa_fopen_cloexec(fn, "r"))) { if (result) *result = pa_xstrdup(fn); @@ -1634,7 +1634,7 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env fn = buf; #endif - if ((f = fopen(fn, "r"))) { + if ((f = pa_fopen_cloexec(fn, "r"))) { if (result) *result = pa_xstrdup(fn); @@ -1661,7 +1661,7 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env global = buf; #endif - if ((f = fopen(global, "r"))) { + if ((f = pa_fopen_cloexec(global, "r"))) { if (result) *result = pa_xstrdup(global); @@ -2560,7 +2560,7 @@ char *pa_machine_id(void) { * since it fits perfectly our needs and is not as volatile as the * hostname which might be set from dhcp. */ - if ((f = fopen(PA_MACHINE_ID, "r"))) { + if ((f = pa_fopen_cloexec(PA_MACHINE_ID, "r"))) { char ln[34] = "", *r; r = fgets(ln, sizeof(ln)-1, f); |