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 Fri, Aug 22, 2008 at 11:18 AM, Ignatios Souvatzis <is%netbsd.org@localhost> 
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?
There is a difference between some readable file and executable one.

Actually glibc makes do_system("exit 0") and checks result for 0. I
discussed that with my colleagues and we decide to go by above way.

-- 
With Best Regards,
Andy Shevchenko


Home | Main Index | Thread Index | Old Index