Use a lock file and flock() to serialize server start, avoids problems

when running a bunch of tmux from cron at the same time. Based on a diff
from Tim Ruehsen.
This commit is contained in:
Nicholas Marriott
2012-03-09 09:57:40 +00:00
parent 18012f5b18
commit ac9ebc29a2
3 changed files with 46 additions and 15 deletions

2
tmux.h
View File

@ -1687,7 +1687,7 @@ const char *key_string_lookup_key(int);
extern struct clients clients;
extern struct clients dead_clients;
extern struct paste_stack global_buffers;
int server_start(void);
int server_start(int, char *);
void server_update_socket(void);
/* server-client.c */