Subject: Re: System call
From: Bob McGowan <[email-masked]>
To: [email-masked]
Date: Mon, 07 Aug 2000 15:05:23 -0700

I've been using the CD ver 1.0 of Cygwin and I find the following:

$ type dir
dir is /usr/bin/dir
$ ls -l /usr/bin/dir*
-rwxr-xr-x   1 rmcgowan None  82530 Sep 13  1999 /usr/bin/dir.exe
-rwxr-xr-x   1 rmcgowan None  26624 Jan 17  2000 /usr/bin/dircolors.exe
-rwxr-xr-x   1 rmcgowan None  16896 Jan 17  2000 /usr/bin/dirname.exe
$ file /usr/bin/dir.exe
/usr/bin/dir.exe: MS Windows PE 32-bit Intel 80386 console executable
not relocatable

I have also checked the sources and find the following comment at the
beginning of the file 'ls.c':

/* `dir', `vdir' and `ls' directory listing programs for GNU.
   Copyright (C) 85, 88, 90, 91, 95, 1996 Free Software Foundation, Inc.

This appears as part of the 'fileutils' package, included on the CD.

A TOC on the fileutils package in Cygwin 1.1.4 shows ls.exe and
vdir.exe, but no dir.exe.

Perhaps this is the source of some of the confusion?

Chris Faylor wrote:
> 
> On Mon, Aug 07, 2000 at 10:21:22AM -0400, DJ Delorie wrote:
> >>   errno=system("dir");
> >
> >There is no program called "dir" anywhere on your computer.  No
> >dir.exe, no dir.com.  Only the command shell knows how to run "dir"
> >(and other built-ins).  So, if you want to do a "dir" you must tell
> >the command shell to do it, either with system("cmd /c dir") or system
> >("command /c dir").
> 
> Also, make sure that you have a "/bin/sh" on your system.
> 
> The system() function uses /bin/sh to run programs.
> 
> cgf
> 
> --
> Want to unsubscribe from this list?
> Send a message to [email-masked]

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
[email-masked]

--
Want to unsubscribe from this list?
Send a message to [email-masked]