On Tue, Oct 03, 2000, [EMAIL PROTECTED] wrote:
> On Tue, 3 Oct 2000, Ralf S. Engelschall wrote:
>
> > /* execute the command through Bourne Shell */
> > execl("/bin/sh", "sh", "-c", cmd, NULL);
>
> Perhaps this should be:
> execl(PTH_PATH_BINSH, "sh", "-c", cmd, NULL);
Yes, of course. Fixed. Thanks for the hint.
> Just a thought. Should you also verify that the PTH_PATH_BINSH file is
> actually executable when system(NULL) is called? I'm not sure what the
> POSIX rules say about this (it's non-trivial, since it depends on the
> owner, group, and other permissions, as well as whether the euid is 0 or
> not).
No, in case it is not executable, the execl() fails and the exit(127)
will provide the correct POSIX return code for this situation.
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
______________________________________________________________________
GNU Portable Threads (Pth) http://www.gnu.org/software/pth/
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager (Majordomo) [EMAIL PROTECTED]