git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
larsxschneider@gmail.com <larsxschneider@gmail.com>
Date
Dec 20, 2015, 16:44 UTC
Message-ID
<1450629869-49522-2-git-send-email-larsxschneider@gmail.com>
In-Reply-To
<1450629869-49522-1-git-send-email-larsxschneider@gmail.com>
From: Lars Schneider <larsxschneider@gmail.com>

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@gmail.com>
---
 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
Previous: larsxschneider@gmail.comNext: larsxschneider@gmail.com
Message 2 of 8 in “git-p4: kill watchdog and suppress irrelevant output”
  1. 0/2 git-p4: kill watchdog and suppress irrelevant outputlarsxschneider@gmail.com, Dec 20, 2015
  2. 1/2 git-p4: kill p4d watchdog on cleanuplarsxschneider@gmail.com, Dec 20, 2015
  3. 2/2 git-p4: suppress non test relevant outputlarsxschneider@gmail.com, Dec 20, 2015
  4. Junio C HamanoDec 21, 2015
  5. Lars SchneiderDec 22, 2015
  6. Luke DiamandDec 24, 2015
  7. Junio C HamanoDec 21, 2015
  8. Lars SchneiderDec 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.