Commit ac881693 authored by Leigh B Stoller's avatar Leigh B Stoller

Change calls to AuditFork() to main::WrapperFork(). We want to know

that the callee has forked in the wrapper so we can avoid storing the
log twice into long term storage. Originally, we just created a new
log file since it was going to be deleted anyway, but now we want to
just extend the original logfile for long term storage.
parent 8ac3f988
......@@ -504,18 +504,14 @@ sub CreateSliver($)
}
#
# At this point we want to return and let the startsliver proceed
# in the background
# in the background. Parent never returns, just the child.
#
my $mypid = fork();
my $mypid = main::WrapperFork();
if ($mypid) {
# Let the child get going.
sleep(1);
return GeniResponse->Create(GENIRESPONSE_SUCCESS,
[$sliver_credential, $sliver_manifest]);
}
# This switches the file that we are writing to.
libaudit::AuditFork();
# Make sure that the next phase sees all changes.
Experiment->FlushAll();
Node->FlushAll();
......@@ -912,16 +908,11 @@ sub SliverAction($$$$$)
# At this point we want to return and let the startsliver proceed
# in the background
#
my $mypid = fork();
my $mypid = main::WrapperFork();
if ($mypid) {
# Let the child get going.
sleep(1);
return GeniResponse->Create(GENIRESPONSE_SUCCESS);
}
$isasync = 1;
# This switches the file that we are writing to.
libaudit::AuditFork();
}
$response = &$PerformAction($aggregate, $action);
goto bad
......@@ -2407,16 +2398,11 @@ sub CreateImage($)
# At some point this might change to let clone do the snapshot,
# but when that happens, the email is sent to geniuser.
#
my $mypid = fork();
my $mypid = main::WrapperFork();
if ($mypid) {
# Let the child get going.
sleep(1);
return GeniResponse->Create(GENIRESPONSE_SUCCESS,
[$image_urn, $image_url]);
}
# This switches the file that we are writing to.
libaudit::AuditFork();
#
# Do the snapshot.
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment