Output fopen errors other than file not found even when debug is not on

This commit is contained in:
Konstantin Pereiaslov
2024-01-05 02:58:14 -06:00
parent b2ed78225a
commit 941d8fd046

View File

@@ -67,7 +67,7 @@ pid_t read_parent_process_id(pid_t process_id) {
FILE *stat_file;
stat_file = fopen(stat_file_path, "r");
if (stat_file == NULL) {
if (debug) {
if ((!quiet && errno != ENOENT) || debug) {
fprintf_error("Failed to open %s for reading: %s\n", stat_file_path, strerror(errno));
}
return 0;