1#!/bin/sh 2# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/11.t 211352 2010-08-15 21:24:17Z pjd $ 3 4desc="truncate returns ETXTBSY the file is a pure procedure (shared text) file that is being executed" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8 9[ "${os}" = "FreeBSD" ] || quick_exit 10 11requires_exec 12 13echo "1..2" 14 15n0=`namegen` 16 17cp -pf `which sleep` ${n0} 18./${n0} 3 & 19expect ETXTBSY truncate ${n0} 123 20expect 0 unlink ${n0} 21