mirror of
https://github.com/perk11/runwhenidle.git
synced 2026-01-08 21:27:57 -05:00
Output fopen errors other than file not found even when debug is not on
This commit is contained in:
@@ -67,7 +67,7 @@ pid_t read_parent_process_id(pid_t process_id) {
|
|||||||
FILE *stat_file;
|
FILE *stat_file;
|
||||||
stat_file = fopen(stat_file_path, "r");
|
stat_file = fopen(stat_file_path, "r");
|
||||||
if (stat_file == NULL) {
|
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));
|
fprintf_error("Failed to open %s for reading: %s\n", stat_file_path, strerror(errno));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user