From e55f8249e82c7101bc202c3d55968886fda2203f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 9 May 2008 17:05:26 +0000 Subject: [PATCH] - client (Unix): when running app, open fd 0 to /dev/null rather than just closing it (from Gabor Gombas) svn path=/trunk/boinc/; revision=15164 --- checkin_notes | 7 +++++++ client/app_start.C | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index b745b7ddd8..26eb651d41 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3777,3 +3777,10 @@ Rytis May 9 2008 html/inc/ db_ops.inc + +David May 9 2008 + - client (Unix): when running app, open fd 0 to /dev/null + rather than just closing it (from Gabor Gombas) + + client/ + app_start.C diff --git a/client/app_start.C b/client/app_start.C index cff844ad19..c04beefea8 100644 --- a/client/app_start.C +++ b/client/app_start.C @@ -743,9 +743,11 @@ int ACTIVE_TASK::start(bool first_time) { // If an error happens, // exit nonzero so that the core client knows there was a problem. - // close descriptors + // don't pass stdout to the app // - fclose(stdout); + int fd = open("/dev/null", O_RDWR); + dup2(fd, 0); + close(fd); // add project dir to library path //