my $dont_start = (slurp($test) =~ /# !NO_I3_INSTANCE!/);
my $logpath = "$outdir/i3-log-for-" . basename($test);
- my ($fh, $tmpfile) = tempfile();
+ my ($fh, $tmpfile) = tempfile('i3-run-cfg.XXXXXX', UNLINK => 1);
say $fh $config;
say $fh "ipc-socket /tmp/nested-$display";
close($fh);
# default case: socket will be created in /tmp/i3-<username>/ipc-socket.<pid>
#####################################################################
-my ($fh, $tmpfile) = tempfile();
+my ($fh, $tmpfile) = tempfile('/tmp/i3-test-config.XXXXXX', UNLINK => 1);
say $fh "# i3 config file (v4)";
say $fh "font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1";
close($fh);
$socketpath = $tmpdir . "/config.sock";
ok(! -e $socketpath, "$socketpath does not exist yet");
-($fh, $tmpfile) = tempfile();
+($fh, $tmpfile) = tempfile('/tmp/i3-test-config.XXXXXX', UNLINK => 1);
say $fh "# i3 config file (v4)";
say $fh "font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1";
say $fh "ipc-socket $socketpath";
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