git-p4: cleanup better on error exit
authorLuke Diamand <luke@diamand.org>
Wed, 29 Jan 2020 11:12:45 +0000 (11:12 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jan 2020 20:20:58 +0000 (12:20 -0800)
commit6026aff5bbe7389fa276188237b58afbef1b07ff
tree14d8791638c3104dea31569079a10e6d0143c0bc
parentca5b5cce6290351f8cb63ee4ff466ed4a2285319
git-p4: cleanup better on error exit

After an error, git-p4 calls die(). This just exits, and leaves child
processes still running.

Instead of calling die(), raise an exception and catch it where the
child process(es) (git-fastimport) are created.

This was analyzed in detail here:

    https://public-inbox.org/git/20190227094926.GE19739@szeder.dev/

This change does not address the particular issue of p4CmdList()
invoking a subchild and not waiting for it on error.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py