summaryrefslogtreecommitdiff
path: root/usr/src/lib/libproc/common/Pcontrol.c
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2014-07-28 05:15:24 +0000
committerRobert Mustacchi <rm@joyent.com>2014-07-30 10:12:47 +0000
commit29e61af1e4197a2257d9f07c6ea4da563d19856a (patch)
tree890a31a717d54243d68553828cb3011b24f4b6b7 /usr/src/lib/libproc/common/Pcontrol.c
parent773ec6987ca1e06d93c1cadbada051c3be95aaed (diff)
downloadillumos-joyent-29e61af1e4197a2257d9f07c6ea4da563d19856a.tar.gz
OS-3280 need a way to specify the root of a native system in the lx brand
OS-3279 lx brand should allow delegated datasets Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Diffstat (limited to 'usr/src/lib/libproc/common/Pcontrol.c')
-rw-r--r--usr/src/lib/libproc/common/Pcontrol.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/src/lib/libproc/common/Pcontrol.c b/usr/src/lib/libproc/common/Pcontrol.c
index 751c0c3f8a..bde48d1416 100644
--- a/usr/src/lib/libproc/common/Pcontrol.c
+++ b/usr/src/lib/libproc/common/Pcontrol.c
@@ -337,10 +337,16 @@ static const ps_ops_t P_live_ops = {
void
_libproc_init(void)
{
+ const char *root;
+
_libproc_debug = getenv("LIBPROC_DEBUG") != NULL;
_libproc_no_qsort = getenv("LIBPROC_NO_QSORT") != NULL;
_libproc_incore_elf = getenv("LIBPROC_INCORE_ELF") != NULL;
+ if ((root = zone_get_nroot()) != NULL)
+ (void) snprintf(procfs_path, sizeof (procfs_path), "%s/proc",
+ root);
+
(void) sigfillset(&blockable_sigs);
(void) sigdelset(&blockable_sigs, SIGKILL);
(void) sigdelset(&blockable_sigs, SIGSTOP);