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: System call


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 cygwin-unsubscribe@sourceware.cygnus.com

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com

--
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]