delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/07/27/09:43:32

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
To: cygwin AT sourceware DOT cygnus DOT com
Cc: cgf AT cygnus DOT com
Subject: Problem with system()
X-Mailer: Lotus Notes Release 5.0.3 (Intl) 21 March 2000
From: Glenn DOT Davis AT predictive DOT com
Message-ID: <OF0C8FF995.E3BB8A61-ON85256929.004AAD7F@predictive.com>
Date: Thu, 27 Jul 2000 09:42:19 -0400
X-MIMETrack: Serialize by Router on Apollo/Predictive(Release 5.0.4 |June 8, 2000) at 07/27/2000
09:42:22 AM,
Serialize complete at 07/27/2000 09:42:22 AM
MIME-Version: 1.0

Chris,
I guesss I should have given more info.
I tried 
        system ("command /c dir") 
and yes, I am using Windows 95.
In fact I tried a whole bunch of commands that are cygwin commands.
Whatever I do, the system call returns a 127.
I couldn't find what a 127 meant, if anything.
Anyway, is it possible that I can be missing a dll. Or is there only the 
one that I need?
I only installed the base amount of software:
        gcc-2_95_2-2.tar.gz
        cygwin-1.1.2.tar.gz
        binutils-20000625.tar.gz
        bash-2_04_1.tar.gz
I thought that should be enough but maybe not.
Also, since I am only getting the digest version of this mailing list, can 
you cc: me directly?
thanks,
glenn davis.

On Wed, Jul 26, 2000 at 03:56:42PM -0400, Glenn DOT Davis AT predictive DOT com 
wrote:
>Hi,
>I am trying to run a simple program that just uses the system() call, but
>I can't get it to work.
>the call I am using is system("dir");
>
>Am I doing something wrong?

"dir" is not a cygwin command.  It's a function of your command shell.

You probably want to do one of:

- system ("ls");                /* The cygwin way */

- system ("command /c dir");    /* Windows 95 */

- system ("cmd /c dir");        /* Windows NT */

cgf


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