delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/07/18:02:55

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <398F32A3.12530BE4@veritas.com>
Date: Mon, 07 Aug 2000 15:05:23 -0700
From: Bob McGowan <rmcgowan AT veritas DOT com>
Organization: VERITAS Software
X-Mailer: Mozilla 4.73 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: System call
References: <F68EqPeQ1qV94h4Jzgi0000240a AT hotmail DOT com> <200008071421 DOT KAA02793 AT envy DOT delorie DOT com> <20000807161543 DOT G12330 AT cygnus DOT com>

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 AT sourceware DOT cygnus DOT com

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan AT veritas DOT com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019