Skip to content
Snippets Groups Projects
Commit 3902661a authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

say: fix indent, add a comment

parent 0e4c6dfa
No related branches found
No related tags found
No related merge requests found
......@@ -295,7 +295,7 @@ say_logger_init(const char *init_str, int level, int nonblock, int background)
enum say_logger_type type;
if (say_parse_logger_type(&init_str, &type)) {
say_error("logger: bad initialization string: %s, %s",
init_str, logger_syntax_reminder);
init_str, logger_syntax_reminder);
exit(EXIT_FAILURE);
}
switch (type) {
......@@ -310,6 +310,12 @@ say_logger_init(const char *init_str, int level, int nonblock, int background)
say_file_init(init_str);
break;
}
/*
* Set non-blocking mode if a non-default log
* output is set. Avoid setting stdout to
* non-blocking: this will garble interactive
* console output.
*/
if (nonblock) {
int flags;
if ( (flags = fcntl(log_fd, F_GETFL, 0)) < 0 ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment