diff --git a/sched/feeder.C b/sched/feeder.C index 8c69e270c7..849f9eb47a 100644 --- a/sched/feeder.C +++ b/sched/feeder.C @@ -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); } diff --git a/sched/result_retry.C b/sched/result_retry.C index f89dd91e0d..d0d1745fb8 100644 --- a/sched/result_retry.C +++ b/sched/result_retry.C @@ -7,6 +7,8 @@ // [ -nredundancy n ] try to get at least this many done results // [ -asynch ] be asynchronous +using namespace std; + #include #include #include