+ my $cmd = "exec $i3cmd -c $args{configfile} >>$logfile 2>&1";
+
+ if ($args{strace}) {
+ my $out = "$outdir/strace-for-$test.log";
+
+ # We overwrite LISTEN_PID with the correct process ID to make
+ # socket activation work (LISTEN_PID has to match getpid(),
+ # otherwise the LISTEN_FDS will be treated as a left-over).
+ $cmd = qq|strace -fF -s2048 -v -o "$out" -- | .
+ 'sh -c "export LISTEN_PID=\$\$; ' . $cmd . '"';
+ }
+
+ if ($args{xtrace}) {
+ my $out = "$outdir/xtrace-for-$test.log";
+
+ # See comment in $args{strace} branch.
+ $cmd = qq|xtrace -n -o "$out" -- | .
+ 'sh -c "export LISTEN_PID=\$\$; ' . $cmd . '"';
+ }