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

Re: Background processes in post-receive hook

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Apr 3, 2011, 03:22 UTC
Message-ID
<BANLkTin4-fMhi_5H1oZ+gPB99stj5GRjVA@mail.gmail.com>
In-Reply-To
<AANLkTinrEt6DkwhknpDZ0iV9PR+7bBd3DAaPRJOgNFTG@mail.gmail.com>
On Sun, Apr 3, 2011 at 4:33 AM, James Pickens <jepicken@gmail.com> wrote:
Show 8 quoted lines
> Hi,
>
> I have a post-receive hook (bash script) that launches several background
> processes and exits immediately.  I do that so I don't have to wait for the
> background processes to finish every time I push to the repository, but Git
> seems to wait for them to finish anyways, even though the post-receive hook
> itself already exited.  Is there any way to stop Git from waiting and let the
> push finish immediately?  Sorry if I'm missing something obvious...
interestingly, the double fork trick doesn't work either...
  ( ( long-running-command & ) )
What Junio said may be the only alternative...
Previous: Junio C HamanoNext: Joe Ratterman
Message 3 of 5 in “Background processes in post-receive hook”
  1. James PickensApr 2, 2011
  2. Junio C HamanoApr 3, 2011
  3. Sitaram ChamartyApr 3, 2011
  4. Joe RattermanApr 3, 2011
  5. Jonathan NiederApr 3, 2011

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.