git does not wait on hook exes (^C)
- From
Anthony Sottile <asottile@umich.edu>
- Date
- Feb 20, 2020, 21:14 UTC
- Message-ID
- <CA+dzEB=jJEkuvcX5qDfeXS=mbJu_m=-yUsmHd_KrKAXC3YDe7w@mail.gmail.com>
Here's a small example:
```bash
#!/usr/bin/env bash
foo() {
echo zzz part 2
sleep 1
echo exiting now
}
trap foo SIGINTecho 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