tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] Fix system() behaviour when parameter is NULL



On Wed, Aug 20, 2008 at 05:08:24PM +0300, Andy Shevchenko wrote:

> +      * ISO/IEC 9899:1999 in 7.20.4.6 describes this special case.
> +      * We need to check availability of a command interpreter.
> +      */ 
> +     if (command == NULL) {
> +             if (access(_PATH_BSHELL, R_OK | X_OK) == 0)

assuming we want to do that: shouldn't checking for X_OK be enough?

Certainly, that's all what's needed to execute a binary program.

        -is


Home | Main Index | Thread Index | Old Index