Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logger.c: Don't log to STDOUT if it's redirected to /dev/null.
Previously, we assumed that if the BBS was running in the foreground, it was connected to a TTY, such as a PTY, under screen, etc. However, under systemd, the BBS is run in the foreground but not necessarily with a TTY. This is actually okay, except if StandardOutput=null, then STDOUT is redirected to /dev/null, so any logs written there are just discarded. This is actually okay, too (attempting to write to /dev/null obviously won't cause an issue), but for a slight efficiency boost, we now detect this on startup so we can skip logging work that is specific to the foreground console later on.
- Loading branch information