]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commit
sys: make stdout/stderr configurable during runtime
authorbones_was_here <bones_was_here@xonotic.au>
Wed, 3 Jan 2024 16:58:15 +0000 (02:58 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 5 Jan 2024 05:31:06 +0000 (15:31 +1000)
commit6c6f864fe87a2a8173aa0c0903b3f068872f956a
tree7527296c35fca590e97232b5c882bb52ac5306e0
parent5534363cd693d1486e994d0fc2e21185fb2d9ff8
sys: make stdout/stderr configurable during runtime

Adds cvar sys_stdout which offers the same behaviours as the -nostdout
and -stderr cmdline options and is initialised by them if they're passed.
Makes -noterminal cmdline option a synonym for -nostdout, previously it
was effectively the same but less efficient.

Platforms with the fcntl() syscall (ie non-Windows):
Changes to non-blocking stdout/stderr by default to prevent stutters and
halts in certain scenarios.
Adds cvar sys_stdout_blocks for enabling blocking stdout/stderr if
required.

Retrieves stdio stream FDs instead of assuming they're always 0,1,2.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
console.c
host.c
sys_shared.c