On Wed, Jan 04, 2012 at 02:15:10PM -0800, Junio C Hamano wrote: > >> Do you really need to kill the children but not the daemon? > > > > If I kill just the parent "git daemon" command, then the actual > > git-daemon (started by run_command) will be left behind. > > Sounds like we would be better off with a new "--foreground" option other > daemon-ish projects seem to have? Isn't that usually for "don't background yourself"? AFAIK, git-daemon stays in the foreground and only forks to handle each connection. So can't we just kill the main process, and any running cruft will eventually die as connections are closed? Or is the problem the git wrapper itself, which doesn't kill its subprocess when it dies (which IMHO is a bug which we might want to fix)? In that case, couldn't we just use --pid-file to save the actual daemon pid, and then kill using that? As a side note, it looks like we just start the daemon with "git daemon &". Doesn't that create a race condition with the tests which immediately try to access it (i.e., the first test may run before the daemon actually opens the socket)? -Peff -- 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