From 168be3830ae291dd819abebec813f76151487bb3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 30 Oct 2009 04:54:19 +0100 Subject: use pa_fopen_cloexec() where applicable --- src/pulsecore/database-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pulsecore/database-simple.c') diff --git a/src/pulsecore/database-simple.c b/src/pulsecore/database-simple.c index 1f4caf71..754930db 100644 --- a/src/pulsecore/database-simple.c +++ b/src/pulsecore/database-simple.c @@ -237,7 +237,7 @@ pa_database* pa_database_open(const char *fn, pa_bool_t for_write) { path = pa_sprintf_malloc("%s."CANONICAL_HOST".simple", fn); errno = 0; - f = fopen(path, "r"); + f = pa_fopen_cloexec(path, "r"); if (f || errno == ENOENT) { /* file not found is ok */ db = pa_xnew0(simple_data, 1); @@ -480,7 +480,7 @@ int pa_database_sync(pa_database *database) { errno = 0; - f = fopen(db->tmp_filename, "w"); + f = pa_fopen_cloexec(db->tmp_filename, "w"); if (!f) goto fail; -- cgit