mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
tests: Don't leave a libguestfs tmpdir lying around after running test-launch-race.pl.
Calling _exit(2) in the child process has the side effect that tmp/libguestfsXXXXXX is not cleaned up. Clean it up by ensuring the handle is properly closed before _exit.
This commit is contained in:
@@ -42,7 +42,9 @@ if ($pid == 0) {
|
||||
my $g = Sys::Guestfs->new ();
|
||||
$g->add_drive ("/dev/null");
|
||||
$g->launch ();
|
||||
_exit (0); # So the tmpdir is not removed.
|
||||
$g->close ();
|
||||
# So $tmpdir is not removed by CLEANUP => 1 above.
|
||||
_exit (0);
|
||||
}
|
||||
|
||||
my $g = Sys::Guestfs->new ();
|
||||
|
||||
Reference in New Issue
Block a user