[PATCH v1 1/2] git-p4: kill p4d watchdog on cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Lars Schneider <larsxschneider@xxxxxxxxx>

If failing tests are executed with the "immediate" flag then "kill_p4d"
is not called and consequently the watchdog process, which is supposed
to detect a hanging p4d, is not killed. Kill the watchdog always in the
"on exit" cleanup trap.

Signed-off-by: Lars Schneider <larsxschneider@xxxxxxxxx>
---
 t/lib-git-p4.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
index f9ae1d7..30bf7ae 100644
--- a/t/lib-git-p4.sh
+++ b/t/lib-git-p4.sh
@@ -76,6 +76,7 @@ pidfile="$TRASH_DIRECTORY/p4d.pid"

 # Sometimes "prove" seems to hang on exit because p4d is still running
 cleanup() {
+	kill -9 $watchdog_pid 2>/dev/null
 	if test -f "$pidfile"
 	then
 		kill -9 $(cat "$pidfile") 2>/dev/null && exit 255
--
2.5.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]