mirror of
https://github.com/git/git.git
synced 2024-11-28 04:23:30 +08:00
credential-cache--daemon: delete socket from main()
main() is responsible for cleaning up the socket in the case of errors, so it is reasonable to also make it responsible for cleaning it up when there are no errors. This change also makes the next step easier. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ebebeaea0a
commit
18a3de4214
@ -221,7 +221,6 @@ static void serve_cache(const char *socket_path, int debug)
|
||||
; /* nothing */
|
||||
|
||||
close(fd);
|
||||
unlink(socket_path);
|
||||
}
|
||||
|
||||
static const char permissions_advice[] =
|
||||
@ -280,5 +279,7 @@ int main(int argc, const char **argv)
|
||||
|
||||
serve_cache(socket_path, debug);
|
||||
|
||||
unlink(socket_path);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user