]> git.sur5r.net Git - i3/i3/commitdiff
complete-run: Bugfix: return condvar when $dont_start is true
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 7 Nov 2011 22:38:06 +0000 (22:38 +0000)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 7 Nov 2011 22:38:06 +0000 (22:38 +0000)
testcases/complete-run.pl

index adef48373bc6be5f00389e9f28ed00832a3cf08c..2f05f703e2a695622f26b2d505c72b8db4a861ed 100755 (executable)
@@ -165,11 +165,14 @@ sub take_job {
     }
 
     my $kill_i3 = sub {
-        # Don’t bother killing i3 when we haven’t started it
-        return if $dont_start;
-
         my $kill_cv = AnyEvent->condvar;
 
+        # Don’t bother killing i3 when we haven’t started it
+        if ($dont_start) {
+            $kill_cv->send();
+            return $kill_cv;
+        }
+
         # When measuring code coverage, try to exit i3 cleanly (otherwise, .gcda
         # files are not written) and fallback to killing it
         if ($coverage_testing || $valgrind) {