summaryrefslogtreecommitdiff
path: root/usr/src/lib/libproc/common/Pcontrol.c
diff options
context:
space:
mode:
authorEdward Pilatowicz <Edward.Pilatowicz@Sun.COM>2009-07-29 10:29:28 -0700
committerEdward Pilatowicz <Edward.Pilatowicz@Sun.COM>2009-07-29 10:29:28 -0700
commitd9452f237f843c1321abb5810d2f9ee6cbeae43c (patch)
treedfcdd5236a225b33960c91dc69b82c7e8f76cd1c /usr/src/lib/libproc/common/Pcontrol.c
parent88bb18d257c743ee382a1694604771c6b7dee061 (diff)
downloadillumos-gate-d9452f237f843c1321abb5810d2f9ee6cbeae43c.tar.gz
6863263 libproc doesn't access in-core elf data correctly
Diffstat (limited to 'usr/src/lib/libproc/common/Pcontrol.c')
-rw-r--r--usr/src/lib/libproc/common/Pcontrol.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/src/lib/libproc/common/Pcontrol.c b/usr/src/lib/libproc/common/Pcontrol.c
index fd4e10fb74..deccb122c3 100644
--- a/usr/src/lib/libproc/common/Pcontrol.c
+++ b/usr/src/lib/libproc/common/Pcontrol.c
@@ -20,14 +20,13 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Portions Copyright 2007 Chad Mynhier
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
+#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -59,6 +58,7 @@
int _libproc_debug; /* set non-zero to enable debugging printfs */
int _libproc_no_qsort; /* set non-zero to inhibit sorting */
/* of symbol tables */
+int _libproc_incore_elf; /* only use in-core elf data */
sigset_t blockable_sigs; /* signals to block when we need to be safe */
static int minfd; /* minimum file descriptor returned by dupfd(fd, 0) */
@@ -99,6 +99,7 @@ _libproc_init(void)
{
_libproc_debug = getenv("LIBPROC_DEBUG") != NULL;
_libproc_no_qsort = getenv("LIBPROC_NO_QSORT") != NULL;
+ _libproc_incore_elf = getenv("LIBPROC_INCORE_ELF") != NULL;
(void) sigfillset(&blockable_sigs);
(void) sigdelset(&blockable_sigs, SIGKILL);