2 .\" Copyright 1989 AT&T Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ISAEXEC 3C "Mar 20, 1998"
8 isaexec \- invoke isa-specific executable
14 \fBint\fR \fBisaexec\fR(\fBconst char *\fR\fIpath\fR, \fBchar *const\fR \fIargv[]\fR, \fBchar *const\fR \fIenvp[]\fR);
20 The \fBisaexec()\fR function takes the path specified as \fIpath\fR and breaks
21 it into directory and file name components. It enquires from the running system
22 the list of supported instruction set architectures; see \fBisalist\fR(5). The
23 function traverses the list for an executable file in named subdirectories of
24 the original directory. When such a file is located, \fBexecve()\fR is invoked
25 with \fIargv\fR\fB[\|]\fR and \fIenvp\fR\fB[\|]\fR. See \fBexec\fR(2).
29 If no file is located, \fBisaexec()\fR returns \fBENOENT\fR. Other return
30 values are the same as for \fBexecve()\fR.
33 \fBExample 1 \fRExample of \fBisaexec()\fR function.
36 On a system whose \fBisalist\fR is
53 main(int argc, char *argv[], char *envp[])
55 return (isaexec("/bin/thing", argv, envp));
62 will look first for an executable file named \fB/bin/sparcv7/thing\fR, then for
63 an executable file named \fB/bin/sparc/thing\fR. It will invoke \fBexecve()\fR
64 on the first executable file it finds named \fBthing\fR.
68 On that same system, a program called \fB/u/bin/tofu\fR can cause either
69 \fB/u/bin/sparcv7/tofu\fR or \fB/u/bin/sparc/tofu\fR to be invoked using the
76 main(int argc, char *argv[], char *envp[])
78 return (isaexec(getexecname(), argv, envp));
86 See \fBattributes\fR(5) for descriptions of the following attributes:
94 ATTRIBUTE TYPE ATTRIBUTE VALUE
98 Interface Stability Stable
104 \fBexec\fR(2), \fBgetexecname\fR(3C), \fBattributes\fR(5), \fBisalist\fR(5)