tests: make sure to leave no tempfiles behind

This commit is contained in:
Michael Stapelberg
2011-09-24 16:28:21 +01:00
parent 10a9d2a439
commit 1eb011aae1
4 changed files with 8 additions and 4 deletions

View File

@ -382,6 +382,10 @@ sub exit_gracefully {
if (!$exited) {
kill(9, $pid) or die "could not kill i3";
}
if ($socketpath =~ m,^/tmp/i3-test-socket-,) {
unlink($socketpath);
}
}
# Gets the socket path from the I3_SOCKET_PATH atom stored on the X11 root window