|
On a system whose isalist is
the program
|
int
main(int argc, char *argv[], char *envp[])
{
return (isaexec("/bin/thing", argv, envp));
}
|
will look first for an executable file named /bin/sparcv7/thing, then for an executable file named bin/sparc/thing. It will invoke execve()
on the first executable file it finds named thing.
On that same system, a program called /u/bin/tofu can cause either /u/bin/sparcv7/tofu or /u/bin/sparc/tofu to be invoked using the following
code:
|
int
main(int argc, char *argv[], char *envp[])
{
return (isaexec(getexecname(), argv, envp));
}
|
|