Skip to content

Commit

Permalink
Log error to open /proc/self/status only when in debugging mode and a…
Browse files Browse the repository at this point in the history
…ssume not being debugged in this case

Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Nov 15, 2024
1 parent 0d7e5ec commit 1a38455
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,8 @@ pid_t debugger(void)
FILE *status = fopen("/proc/self/status", "r");
if(status == NULL)
{
log_warn("Unable to open /proc/self/status");
// Failed to open status file, assume not being debugged
log_debug(DEBUG_ANY, "Failed to open /proc/self/status: %s", strerror(errno));
return 0;
}

Expand Down

0 comments on commit 1a38455

Please sign in to comment.