fixed fork problem on certain platforms

svn path=/trunk/boinc/; revision=585
This commit is contained in:
Eric Heien 2002-11-08 08:54:16 +00:00
parent 783239db37
commit 4f2896d760
2 changed files with 9 additions and 7 deletions

View File

@ -204,6 +204,12 @@ int main(int argc, char** argv) {
}
}
if (asynch) {
if (fork()!=0) {
exit(0);
}
}
retval = destroy_shmem(config.shmem_key);
if (retval) {
fprintf(stderr, "feeder: can't destroy shmem\n");
@ -233,11 +239,5 @@ int main(int argc, char** argv) {
ssp->napp_versions
);
if (asynch) {
if (fork()==0) {
feeder_loop(ssp);
}
} else {
feeder_loop(ssp);
}
feeder_loop(ssp);
}

View File

@ -7,6 +7,8 @@
// [ -nredundancy n ] try to get at least this many done results
// [ -asynch ] be asynchronous
using namespace std;
#include <vector>
#include <unistd.h>
#include <sys/time.h>