From 4605b549d6483116420bc5e5f54d9591f84986a1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 31 Oct 2018 21:37:09 +0100 Subject: [PATCH] perror() should send output to stderr. --- LibC/stdio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibC/stdio.cpp b/LibC/stdio.cpp index 84ecd38190..33175a8e60 100644 --- a/LibC/stdio.cpp +++ b/LibC/stdio.cpp @@ -170,7 +170,7 @@ int sprintf(char* buffer, const char* fmt, ...) void perror(const char* s) { - printf("%s: %s\n", s, strerror(errno)); + fprintf(stderr, "%s: %s\n", s, strerror(errno)); } FILE* fopen(const char* pathname, const char* mode)