From f1fbe7fffe88b6d23de5f284ca02d7e7cbe940e9 Mon Sep 17 00:00:00 2001 From: "[CST] Bas" Date: Mon, 14 May 2012 23:53:46 +0800 Subject: [PATCH] frontend: do not clone frontend filedescriptors on fork()/system() ie. this fixes that the frontend cannot be opened under the condition that some of the before mentioned calls are still active and then holding the filedescriptors open. --- src/zapit/src/frontend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index e8dc95d10..ef747a565 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -210,7 +210,7 @@ bool CFrontend::Open(void) printf("[fe%d] open %s\n", fenumber, filename); if (fd < 0) { - if ((fd = open(filename, O_RDWR | O_NONBLOCK)) < 0) { + if ((fd = open(filename, O_RDWR | O_NONBLOCK | O_CLOEXEC)) < 0) { ERROR(filename); return false; }