Set 0 buffer for stdout

So that journald can follow its logs
This commit is contained in:
WooParadog 2022-05-30 15:03:13 +08:00 committed by pixl
parent 3fb18a7d5f
commit 99716cbd99
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E

View File

@ -135,6 +135,12 @@ int main(int argc, char** argv) {
std::shared_ptr<Configuration> config;
std::shared_ptr<InputDevice> virtual_input;
/* Set stdout buff to Null so that loging system like journal
* can actually read it.
*/
setbuf(stdout, NULL);
// Read config
try {
config = std::make_shared<Configuration>(options.config_file);