Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
3d26e4b3
Commit
3d26e4b3
authored
Sep 22, 2011
by
Leigh B Stoller
Browse files
When failing to remove experiment directory, try to rename it
instead.
parent
8616f37f
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/Experiment.pm.in
View file @
3d26e4b3
...
...
@@ -784,11 +784,16 @@ sub Delete($;$)
print "*** WARNING: Not able to remove $userdir\n";
print " Someone will need to do this by hand.\n";
# Try to move the directory.
my $moved = (system("/bin/mv -f $userdir ${userdir}.$$") == 0);
# NFS errors usually the result. Sometimes its cause there is
# someone in the directory, so its being held open.
libtestbed::SENDMAIL($TBOPS,
"Experiment::Delete: Could not remove directory",
"Could not remove $userdir.\n".
"Could not remove $userdir. ".
($moved ?
"Renamed to ${userdir}.$$ ..." : "") . "\n" .
"Someone will need to do this by hand.\n");
}
if (system("/bin/rm -rf $workdir")) {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment