Skip to content

Commit

Permalink
Make all PDEBUG calls print the PID, helpful for multiprocess applica…
Browse files Browse the repository at this point in the history
…tions.
  • Loading branch information
crass committed Sep 1, 2018
1 parent 428d8c7 commit 13fa255
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#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 PSTDERR(fmt, args...) do { dprintf(2,fmt, getpid(), ## args); } while(0)
# define PDEBUG(fmt, args...) PSTDERR("DEBUG:pid[%d]:"fmt, ## args)
# define DEBUGDECL(args...) args

# include "core.h"
Expand Down

0 comments on commit 13fa255

Please sign in to comment.