mirror of https://github.com/BOINC/boinc.git
fixed fork problem on certain platforms
svn path=/trunk/boinc/; revision=585
This commit is contained in:
parent
783239db37
commit
4f2896d760
|
@ -204,6 +204,12 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (asynch) {
|
||||||
|
if (fork()!=0) {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
retval = destroy_shmem(config.shmem_key);
|
retval = destroy_shmem(config.shmem_key);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
fprintf(stderr, "feeder: can't destroy shmem\n");
|
fprintf(stderr, "feeder: can't destroy shmem\n");
|
||||||
|
@ -233,11 +239,5 @@ int main(int argc, char** argv) {
|
||||||
ssp->napp_versions
|
ssp->napp_versions
|
||||||
);
|
);
|
||||||
|
|
||||||
if (asynch) {
|
feeder_loop(ssp);
|
||||||
if (fork()==0) {
|
|
||||||
feeder_loop(ssp);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
feeder_loop(ssp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
// [ -nredundancy n ] try to get at least this many done results
|
// [ -nredundancy n ] try to get at least this many done results
|
||||||
// [ -asynch ] be asynchronous
|
// [ -asynch ] be asynchronous
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
Loading…
Reference in New Issue