diff options
author | markj <markj@FreeBSD.org> | 2013-10-27 20:39:10 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2013-10-27 20:39:10 +0000 |
commit | 7799e7909514ade5a6bed2c5c96437f480fb66ff (patch) | |
tree | c3e5d57b0ede806e1bbdfd6008e59072bea60245 /lib/libproc/proc_util.c | |
parent | 977e19e0686a42b91c6eeb80be9a14338f1b7f2e (diff) | |
download | FreeBSD-src-7799e7909514ade5a6bed2c5c96437f480fb66ff.zip FreeBSD-src-7799e7909514ade5a6bed2c5c96437f480fb66ff.tar.gz |
Clean up the debug printing in libproc a bit. In particular:
* Don't print any error messages to stderr unless DEBUG is defined.
* Add a DPRINTFX macro for use when errno isn't set.
* Print the error string from libelf when appropriate.
Diffstat (limited to 'lib/libproc/proc_util.c')
-rw-r--r-- | lib/libproc/proc_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libproc/proc_util.c b/lib/libproc/proc_util.c index 089095e..1c3d522 100644 --- a/lib/libproc/proc_util.c +++ b/lib/libproc/proc_util.c @@ -146,7 +146,7 @@ proc_wstatus(struct proc_handle *phdl) return (-1); if (waitpid(phdl->pid, &status, WUNTRACED) < 0) { if (errno != EINTR) - warn("waitpid"); + DPRINTF("waitpid"); return (-1); } if (WIFSTOPPED(status)) |