This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with system()


On Thu, Jul 27, 2000 at 04:50:04PM +0200, Corinna Vinschen wrote:
>Chris Faylor wrote:
>> 
>> On Thu, Jul 27, 2000 at 09:42:19AM -0400, Glenn.Davis@predictive.com wrote:
>> >Chris,
>> >I guesss I should have given more info.
>> >I tried
>> >        system ("command /c dir")
>> >and yes, I am using Windows 95.
>> 
>> I don't know what's wrong but I would check basic things like your PATH.
>> If you don't have a command.com in your path then system is obviously
>> not going to be able to run "command".
>
>You have to use "command.com /c dir" because the standard search
>algorithm only finds apps which don't have an extension or which have
>the ".exe" extension. ".com" isn't supported.

This is the standard extension search:

suffix_info std_suffixes[] =
{
  suffix_info (".exe", 1), suffix_info ("", 1),
  suffix_info (".com"), suffix_info (".cmd"),
  suffix_info (".bat"), suffix_info (".dll"),
  suffix_info (NULL)
};

So, .com should be supported.  It is when I try it, anyway.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]