From f7efb1ecbebd52a60e228a1984face7cbf19e7ed Mon Sep 17 00:00:00 2001 From: crass Date: Sat, 1 Sep 2018 05:18:13 -0500 Subject: [PATCH] Make all PDEBUG calls print the PID, helpful for multiprocess applications. --- src/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug.h b/src/debug.h index b9b5215..4e65f50 100644 --- a/src/debug.h +++ b/src/debug.h @@ -4,7 +4,7 @@ #ifdef DEBUG # include # define PSTDERR(fmt, args...) do { dprintf(2,fmt, ## args); } while(0) -# define PDEBUG(fmt, args...) PSTDERR("DEBUG:"fmt, ## args) +# define PDEBUG(fmt, args...) PSTDERR("DEBUG:pid[%d]:"fmt, getpid(), ## args) # define DEBUGDECL(args...) args # include "core.h"