If there is an error in the configuration file, don't just exit(1) as this can

cause the client to hang. Instead, send the error message, then mark the client
as bad and start a normal shutdown so the server exits once the error is
written.

This also allows some code duplicating daemon(3) to be trimmed and logging to
begin earlier.

Prompted by Theo noticing the behaviour on error wasn't documented.
This commit is contained in:
Nicholas Marriott
2009-08-07 15:39:10 +00:00
parent ccaf8724e4
commit e89e70e715
4 changed files with 53 additions and 39 deletions

1
tmux.h
View File

@ -900,6 +900,7 @@ struct client {
#define CLIENT_STATUS 0x10
#define CLIENT_REPEAT 0x20 /* allow command to repeat within repeat time */
#define CLIENT_SUSPENDED 0x40
#define CLIENT_BAD 0x80
int flags;
char *message_string;