author | Junio C Hamano <gitster@pobox.com> | |
Fri, 19 Dec 2008 01:31:57 +0000 (17:31 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 21 Dec 2008 09:56:20 +0000 (01:56 -0800) | ||
commit | 0693f9ddad3d9af3d3424087557bbddce480ce3f | |
tree | bee18d67e504137396ed341f4c847391b0b298fe | tree | snapshot |
parent | c55fae43c4e10e2779e4fb7d70d6f6e4a7645a63 | commit | diff |
Make sure lockfiles are unlocked when dying on SIGPIPE
We cleaned up lockfiles upon receiving the usual suspects HUP, TERM, QUIT
but a wicked user could kill us of asphyxiation by piping our output to a
pipe that does not read. Protect ourselves by catching SIGPIPE and clean
up the lockfiles as well in such a case.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We cleaned up lockfiles upon receiving the usual suspects HUP, TERM, QUIT
but a wicked user could kill us of asphyxiation by piping our output to a
pipe that does not read. Protect ourselves by catching SIGPIPE and clean
up the lockfiles as well in such a case.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
lockfile.c | diff | blob | history | |
t/t3600-rm.sh | diff | blob | history |