Skip to content

Commit

Permalink
Merge pull request #36 from KNX-IOT/rwells1703-headless-service
Browse files Browse the repository at this point in the history
Enabled line buffer flushing for journal logs.
  • Loading branch information
WAvdBeek authored Aug 1, 2022
2 parents 30a0ab7 + f6a30dc commit 1f54eaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion knx_iot_pb_pi.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ main(void)
sa.sa_handler = handle_signal;
/* install Ctrl-C */
sigaction(SIGINT, &sa, NULL);

/* Disable full buffering so stdout appears in journalctl */
setvbuf(stdout, NULL, _IONBF, BUFSIZ);
PyImport_AppendInittab("knx", PyInit_knx);

Py_Initialize();
Expand Down
2 changes: 2 additions & 0 deletions knx_iot_sa_pi.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ main(void)
sa.sa_handler = handle_signal;
/* install Ctrl-C */
sigaction(SIGINT, &sa, NULL);
/* Disable full buffering so stdout appears in journalctl */
setvbuf(stdout, NULL, _IONBF, BUFSIZ);

app_set_post_cb(post_callback);

Expand Down

0 comments on commit 1f54eaf

Please sign in to comment.