Skip to content

Commit 13fa255

Browse files
author
crass
committed
Make all PDEBUG calls print the PID, helpful for multiprocess applications.
1 parent 428d8c7 commit 13fa255

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/debug.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#ifdef DEBUG
55
# include <stdio.h>
6-
# define PSTDERR(fmt, args...) do { dprintf(2,fmt, ## args); } while(0)
7-
# define PDEBUG(fmt, args...) PSTDERR("DEBUG:"fmt, ## args)
6+
# define PSTDERR(fmt, args...) do { dprintf(2,fmt, getpid(), ## args); } while(0)
7+
# define PDEBUG(fmt, args...) PSTDERR("DEBUG:pid[%d]:"fmt, ## args)
88
# define DEBUGDECL(args...) args
99

1010
# include "core.h"

0 commit comments

Comments
 (0)