Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdio_ext.h>
FILE *fp = fopen ("/proc/self/maps", "rc");
if (fp == NULL)
- return -1;
+ {
+ if (errno == ENOENT)
+ /* It is the system administrator's choice to not have /proc
+ available to this process (e.g., because it runs in a chroot
+ environment. Don't fail in this case. */
+ return 1;
+ return -1;
+ }
/* We need no locking. */
__fsetlocking (fp, FSETLOCKING_BYCALLER);