da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Common Development and Distribution License (the "License").
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner * You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Use is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ERR_SET_ULIMIT "unable to set ulimit to <%ld> blocks"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ERR_DO_ULIMIT "An attempt was made to create a file larger than " \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "ULIMIT. Source of fault is unknown."
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define ERR_SCRULIMIT "Script <%s> attempted to create a file exceeding " \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinstatic struct rlimit ulimit = {RLIM_INFINITY, RLIM_INFINITY};
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinstatic struct rlimit dblimit = {RLIM_INFINITY, RLIM_INFINITY};
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinvoid ulimit_quit(); /* XFSZ controlled signal handler. */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinint clr_ulimit(); /* Clear the user supplied file size limit. */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinvoid set_limit(); /* Called from installf to undo ulimit */
if (limit_is_set) {
if (script_name)
if (scr_error)
if (limit_is_set) {
if (script_name)
if (scr_error)
#ifdef lint
if (script_name) {
if (scr_error)