mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
Do lock failures slightly better, return a special value so we don't
unlink the wrong thing.
This commit is contained in:
parent
73e30cbda8
commit
dca93c56e0
2 changed files with 23 additions and 19 deletions
8
server.c
8
server.c
|
|
@ -195,9 +195,11 @@ server_start(struct event_base *base, int lockfd, char *lockfile)
|
|||
server_update_socket();
|
||||
server_client_create(pair[1]);
|
||||
|
||||
unlink(lockfile);
|
||||
free(lockfile);
|
||||
close(lockfd);
|
||||
if (lockfd >= 0) {
|
||||
unlink(lockfile);
|
||||
free(lockfile);
|
||||
close(lockfd);
|
||||
}
|
||||
|
||||
start_cfg();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue