tst.DestructWithModule.d.ksh revision 178476
1155324Simp#!/bin/ksh -p 2155324Simp# 3185265Simp# CDDL HEADER START 4155324Simp# 5155324Simp# The contents of this file are subject to the terms of the 6155324Simp# Common Development and Distribution License (the "License"). 7155324Simp# You may not use this file except in compliance with the License. 8155324Simp# 9155324Simp# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10155324Simp# or http://www.opensolaris.org/os/licensing. 11155324Simp# See the License for the specific language governing permissions 12155324Simp# and limitations under the License. 13155324Simp# 14155324Simp# When distributing Covered Code, include this CDDL HEADER in each 15155324Simp# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16185265Simp# If applicable, add the following below this CDDL HEADER, with the 17185265Simp# fields enclosed by brackets "[]" replaced with your own identifying 18185265Simp# information: Portions Copyright [yyyy] [name of copyright owner] 19185265Simp# 20185265Simp# CDDL HEADER END 21185265Simp# 22185265Simp 23185265Simp# 24185265Simp# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 25185265Simp# Use is subject to license terms. 26185265Simp# 27155324Simp 28155324Simp#ident "%Z%%M% %I% %E% SMI" 29266095Sian 30155324Simp## 31155324Simp# 32266095Sian# ASSERTION: 33155324Simp# The -w option can be used to permit destructive actions in D programs. 34155324Simp# 35155324Simp# SECTION: dtrace Utility/-w Option; 36155324Simp# dtrace Utility/-m Option 37155324Simp# 38155324Simp## 39155324Simp 40187602Simpif [ $# != 1 ]; then 41187602Simp echo expected one argument: '<'dtrace-path'>' 42155324Simp exit 2 43155324Simpfi 44155324Simp 45187602Simpdtrace=$1 46155324Simp 47155324Simp$dtrace -qwm unix'{chill(15); printf("Done chilling"); exit(0);}' 48187602Simpstatus=$? 49155324Simp 50155324Simpif [ "$status" -ne 0 ]; then 51155324Simp echo $tst: dtrace failed 52155324Simpfi 53155324Simp 54283327Sianexit $status 55155324Simp