2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/Aextern int gmatch(
const char *s,
const char *p);
2N/A/* environment variables */ 2N/A * avoid malloc which causes certain applications to crash 2N/A * Return the pointer to the fully-resolved path name of the process's 2N/A * executable file obtained from the AT_SUN_EXECNAME aux vector entry. 2N/A * The first time through, read the initial aux vector that was 2N/A * passed to the process at exec(2). Only do this once. 2N/A * check if exec name matches cfgname found in mpss cfg file. 2N/A /* cfgname should not have a '/' unless it begins with one */ 2N/A * if execname does not begin with a '/', prepend the 2N/A * current directory. 2N/A }
else {
/* simple cfg name */ 2N/A /* execname is a path name - get the base name */ 2N/A * Check if string matches any of exec arguments. 2N/A while ((c = *
str) ==
'\n' || c ==
' ' || c ==
'\t')
2N/A * If a private error file is indicated then set the locale 2N/A * for error messages for the duration of this routine. 2N/A * Error messages destined for syslog should not be translated 2N/A * and thus come from the default C locale. 2N/A "%s: cannot open error file: %s [%s]\n"),
2N/A "%s: invalid stack page size specified:" 2N/A "%s: invalid heap page size specified:" 2N/A * Open specified cfg file or default one. 2N/A "%s: cannot open configuration file: %s [%s]\n"),
2N/A * Make sure line wasn't truncated. 2N/A "%s: invalid entry, " 2N/A "line too long - cfgfile:" 2N/A * parse right to left in case delimiter is 2N/A "%s: no delimiters specified - cfgfile:" 2N/A /* found delimiter in lbuf */ 2N/A /* remove for error message */ 2N/A "%s: invalid entry, " 2N/A "missing delimiter - cfgfile: %s," 2N/A /* exec-args is optional */ 2N/A /* empty cfg entry */ 2N/A "%s: invalid heap page size" 2N/A " specified (%s) for %s - " 2N/A "cfgfile: %s, line: %d\n"),
2N/A "%s: invalid stack page size" 2N/A " specified (%s) for %s - " 2N/A "cfgfile: %s, line: %d\n"),
2N/A "%s: memcntl() failed [%s]: heap page size (%s)" 2N/A " for %s not set\n"),
2N/A "%s: memcntl() failed [%s]: stack page size (%s)" 2N/A " for %s not set\n"),
2N/A /* close log file: no-op if nothing logged to syslog */