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

[PATCH 1/3] git-instaweb: Remove pidfile after stopping web server

From
Jakub Narebski <jnareb@gmail.com>
Date
May 28, 2010, 19:11 UTC
Message-ID
<1275073885-26537-2-git-send-email-jnareb@gmail.com>
In-Reply-To
<1275073885-26537-1-git-send-email-jnareb@gmail.com>

This way running e.g. "git instaweb" after "git instaweb --stop" would not try to kill already stopped web server.

This is probably important only for those web servers that are "daemonized" by git-instaweb itself, i.e. for those where it is git-instaweb that creates pidfile. Currently it is includes only 'mongoose' web server, but it would also include 'plackup' web server (added in later commit).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 git-instaweb.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 5c700b6..a8c5dc0 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -114,6 +114,7 @@ EOF
 
 stop_httpd () {
 	test -f "$fqgitdir/pid" && kill $(cat "$fqgitdir/pid")
+	rm -f "$fqgitdir/pid"
 }
 
 while test $# != 0
-- 
1.7.0.1
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 9 in “git-instaweb: Support for 'plackup' and improvements”
  1. 0/3 git-instaweb: Support for 'plackup' and improvementsJakub Narebski, May 28, 2010
  2. 1/3 git-instaweb: Remove pidfile after stopping web serverJakub Narebski, May 28, 2010
  3. 2/3 git-instaweb: Wait for server to start before running web browserJakub Narebski, May 28, 2010
  4. Pavan Kumar SunkaraMay 28, 2010
  5. Jakub NarebskiMay 28, 2010
  6. 3/3 git-instaweb: Add support for running gitweb via 'plackup'Jakub Narebski, May 28, 2010
  7. Eric WongMay 29, 2010
  8. Eric WongMay 29, 2010
  9. Petr BaudisMay 31, 2010

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.