1d2a7078Richard Lowe#! /usr/bin/ksh
2d2a7078Richard Lowe#
3d2a7078Richard Lowe#
4d2a7078Richard Lowe# This file and its contents are supplied under the terms of the
5d2a7078Richard Lowe# Common Development and Distribution License ("CDDL"), version 1.0.
6d2a7078Richard Lowe# You may only use this file in accordance with the terms of version
7d2a7078Richard Lowe# 1.0 of the CDDL.
8d2a7078Richard Lowe#
9d2a7078Richard Lowe# A full copy of the text of the CDDL should have accompanied this
10d2a7078Richard Lowe# source.  A copy of the CDDL is also available via the Internet at
11d2a7078Richard Lowe# http://www.illumos.org/license/CDDL.
12d2a7078Richard Lowe#
13d2a7078Richard Lowe
14d2a7078Richard Lowe# Copyright 2015, Richard Lowe.
15d2a7078Richard Lowe
16d2a7078Richard Lowe/usr/bin/psecflags -s forbidnullmap $$
17d2a7078Richard Lowe
18d2a7078Richard LoweLD_PRELOAD=0@0.so.1 /usr/bin/sleep 100000 &
19d2a7078Richard Lowepid=$!
20d2a7078Richard Lowe
21d2a7078Richard Loweret=0
22d2a7078Richard Lowe(pmap $pid | grep -q '^00000000 ') && ret=1
23d2a7078Richard Lowekill -9 $pid
24d2a7078Richard Lowe
25d2a7078Richard Loweexit $ret