Make all PDEBUG calls print the PID, helpful for multiprocess applications.

pull/257/head
crass 2018-09-01 05:18:13 -05:00
parent 369f92670c
commit f7efb1ecbe
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
#ifdef DEBUG
# include <stdio.h>
# 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"