diff options
author | markj <markj@FreeBSD.org> | 2013-12-25 22:36:27 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2013-12-25 22:36:27 +0000 |
commit | d6a22c4af9f2bcdadc20850e58adf24c37c7407e (patch) | |
tree | 5bdcf42531efa1c8eb5b6b739eb9edfa90adb34a /lib/libproc/proc_create.c | |
parent | e9055f74febe9413802e444141d5e339838b6f36 (diff) | |
download | FreeBSD-src-d6a22c4af9f2bcdadc20850e58adf24c37c7407e.zip FreeBSD-src-d6a22c4af9f2bcdadc20850e58adf24c37c7407e.tar.gz |
MFC r256661 r257222 r257235 r257248 r257298.
MFC r256661:
Fix the libproc build when DEBUG is defined.
MFC r257222:
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.
MFC r257235:
Remove an incorrect debug printf.
MFC r257248:
Fix the build with gcc.
MFC r257298:
Revert r257248 and fix the problem in a way that doesn't violate style(9).
Diffstat (limited to 'lib/libproc/proc_create.c')
-rw-r--r-- | lib/libproc/proc_create.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libproc/proc_create.c b/lib/libproc/proc_create.c index 9bd24a2..d02eccf 100644 --- a/lib/libproc/proc_create.c +++ b/lib/libproc/proc_create.c @@ -75,7 +75,7 @@ proc_attach(pid_t pid, int flags, struct proc_handle **pphdl) /* Check for an unexpected status. */ if (WIFSTOPPED(status) == 0) - DPRINTF("ERROR: child process %d status 0x%x", pid, status); + DPRINTFX("ERROR: child process %d status 0x%x", pid, status); else phdl->status = PS_STOP; @@ -130,14 +130,14 @@ proc_create(const char *file, char * const *argv, proc_child_func *pcf, /* Wait for the child process to stop. */ if (waitpid(pid, &status, WUNTRACED) == -1) { error = errno; - DPRINTF("ERROR: child process %d didn't stop as expected", pid); + DPRINTF("ERROR: child process %d didn't stop as expected", pid); goto bad; } /* Check for an unexpected status. */ if (WIFSTOPPED(status) == 0) { error = errno; - DPRINTF("ERROR: child process %d status 0x%x", pid, status); + DPRINTFX("ERROR: child process %d status 0x%x", pid, status); goto bad; } else phdl->status = PS_STOP; |