aboutsummaryrefslogtreecommitdiff
path: root/cddl/lib
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2016-12-06 04:22:38 +0000
committerMark Johnston <markj@FreeBSD.org>2016-12-06 04:22:38 +0000
commitb043b5dc6bf70af9d188fc37d201bb35dab8feec (patch)
treeb47ad9b1b0fd341f0774f71371efe6e60091519c /cddl/lib
parentc156354ff82167219f10fd80c55f6452acb60328 (diff)
downloadsrc-b043b5dc6bf70af9d188fc37d201bb35dab8feec.tar.gz
src-b043b5dc6bf70af9d188fc37d201bb35dab8feec.zip
libproc: Add support for some proc_attach() flags.
This change adds some handling for the equivalent of Solaris' PGRAB_* flags. In particular, support for PGRAB_RDONLY is needed to avoid a nasty deadlock: dtrace(1) may otherwise stop the master process for its pseudo-terminal and end up blocking while writing to standard output.
Notes
Notes: svn path=/head/; revision=309597
Diffstat (limited to 'cddl/lib')
-rw-r--r--cddl/lib/libdtrace/libproc_compat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cddl/lib/libdtrace/libproc_compat.h b/cddl/lib/libdtrace/libproc_compat.h
index 0bb9e05424b7..167858cf675c 100644
--- a/cddl/lib/libdtrace/libproc_compat.h
+++ b/cddl/lib/libdtrace/libproc_compat.h
@@ -34,6 +34,9 @@
* Functions sorted alphabetically.
*/
#define PR_LMID_EVERY 0
+#define PGRAB_RDONLY PATTACH_RDONLY
+#define PGRAB_FORCE PATTACH_FORCE
+
#define Psetrun(p, a1, a2) proc_continue((p))
#define Pxlookup_by_addr(p, a, n, s, sym, i) \
proc_addr2sym(p, a, n, s, sym)