From 8c8d5bc4a8c2842a1897202b9212c12f76c8191a Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Thu, 2 Jun 2016 18:47:26 +0200 Subject: [PATCH] fix(core): Always initialize input pipe --- src/lemonbuddy.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/lemonbuddy.cpp b/src/lemonbuddy.cpp index ee58496e..3f48c77d 100644 --- a/src/lemonbuddy.cpp +++ b/src/lemonbuddy.cpp @@ -158,18 +158,16 @@ int main(int argc, char **argv) */ std::string pipe_file; - if (!isatty(STDOUT_FILENO)) { - if (cli::has_option("pipe")) { - pipe_file = cli::get_option_value("pipe"); - } else { - pipe_file = "/tmp/lemonbuddy.pipe." - + get_bar()->opts->wm_name - + "." - + std::to_string(proc::get_process_id()); - auto fptr = std::make_unique(pipe_file, "a+"); - if (!*fptr) - throw ApplicationError(StrErrno()); - } + if (cli::has_option("pipe")) { + pipe_file = cli::get_option_value("pipe"); + } else { + pipe_file = "/tmp/lemonbuddy.pipe." + + get_bar()->opts->wm_name + + "." + + std::to_string(proc::get_process_id()); + auto fptr = std::make_unique(pipe_file, "a+"); + if (!*fptr) + throw ApplicationError(StrErrno()); } /**