From: Zhang Qiang Date: Thu, 20 Sep 2012 13:20:05 +0000 (+0800) Subject: exit thread if killed in the middle of creating build root X-Git-Tag: 0.1~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd547c80667f72f10192ec0673332c9508fceb45;p=tools%2Fdepanneur.git exit thread if killed in the middle of creating build root Change-Id: Ia1ada20f3a521ed4d78b08e18c871c83a4e159f8 --- diff --git a/depanneur b/depanneur index ffbf00f..5e63f13 100755 --- a/depanneur +++ b/depanneur @@ -805,7 +805,10 @@ sub build_package { push @args, "--clean"; push @args, $redirect; $cmd = join(" ", @args); - my_system ($cmd); + if (my_system($cmd) != 0) { + threads->detach() if ! threads->is_detached(); + return -1; + } } else { info("build directory does not exist"); }