libc: Open stdout and stderr write-only on init

This commit is contained in:
apio 2022-10-28 17:14:09 +02:00
parent 77d331b258
commit b1729689df

View File

@ -57,8 +57,8 @@ extern char* program_invocation_name;
extern "C" void initialize_libc(int, char** argv)
{
check_for_file(STDIN_FILENO, &stdin, "/dev/kbd", "r");
check_for_file(STDOUT_FILENO, &stdout, "/dev/console", "rw");
check_for_file(STDERR_FILENO, &stderr, "/dev/console", "rw");
check_for_file(STDOUT_FILENO, &stdout, "/dev/console", "w");
check_for_file(STDERR_FILENO, &stderr, "/dev/console", "w");
if (argv) program_invocation_name = argv[0];