git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git does not wait on hook exes (^C)
@ 2020-02-20 21:14 Anthony Sottile
  2020-02-21  0:01 ` brian m. carlson
  0 siblings, 1 reply; 8+ messages in thread
From: Anthony Sottile @ 2020-02-20 21:14 UTC (permalink / raw)
  To: Git Mailing List

Here's a small example:

```bash
#!/usr/bin/env bash
foo() {
    echo zzz part 2
    sleep 1
    echo exiting now
}
trap foo SIGINT

echo zzz part 1
sleep 10
```

```console
$ git --version
git version 2.25.GIT
$ git commit --allow-empty -m foo
zzz part 1
^Czzz part 2

$ exiting now
```

- I pressed ^C during the first sleep
- control was returned back to my terminal
- the hook script was still running in the background

Anthony

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-02-21  6:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20 21:14 git does not wait on hook exes (^C) Anthony Sottile
2020-02-21  0:01 ` brian m. carlson
2020-02-21  0:12   ` Anthony Sottile
2020-02-21  1:11     ` brian m. carlson
2020-02-21  1:20       ` Anthony Sottile
2020-02-21  2:25         ` brian m. carlson
2020-02-21  5:32           ` Jeff King
2020-02-21  6:08             ` Anthony Sottile

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).