> One solution is to create a little program that
> utilizes the
> isaexec API and accepts a pathname to an
> executable.
> See isaexec(3C).
Thanks Moinak.
I did exactly what you told me, and it worked, except that I replicated
/usr/lib/isaexec functionality.
As it turns out, a hard link is needed because of getexecname(3C), as follows:
return(isaexec(getexecname(), argv, envp));
getexecname(3C) follows a symbolic link, so isaexec(3C) now has a wrong
argument for *path.
If I were to follow this approach, a small program with either a hardcoded path
return(isaexec("/opt/abcd/bin/bla", argv, envp));
would have to be compiled for every single binary of every single product I
deliver (think of it as one copy of isaexec(3C) per binary), or I would use one
such "isaexec" in /opt/abcd/lib, but then I'm back to the hard links cannot
span filesystems problem.
Finally, a third approach would be to build my own parser similar to
getexecname(3C), which would return the name of the symbollic link instead of
the name of the target file, but this would require path reconstruction in
order to pass to isaexec(3C) correctly.
Any other ideas?
--
This message posted from opensolaris.org
_______________________________________________
indiana-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/indiana-discuss