- 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
This commit is contained in:
David Anderson 2008-05-09 17:05:26 +00:00
parent 78de217b37
commit e55f8249e8
2 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -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
//