aboutsummaryrefslogtreecommitdiff
path: root/cddl
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
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')
-rw-r--r--cddl/compat/opensolaris/include/libproc.h3
-rw-r--r--cddl/lib/libdtrace/libproc_compat.h3
2 files changed, 3 insertions, 3 deletions
diff --git a/cddl/compat/opensolaris/include/libproc.h b/cddl/compat/opensolaris/include/libproc.h
index 565b0a43dd72..428fa6cf53fe 100644
--- a/cddl/compat/opensolaris/include/libproc.h
+++ b/cddl/compat/opensolaris/include/libproc.h
@@ -38,9 +38,6 @@
#define PR_RLC 0x0001
#define PR_KLC 0x0002
-#define PGRAB_RDONLY O_RDONLY
-#define PGRAB_FORCE 0
-
#include_next <libproc.h>
#endif
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)