delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/01/05:19:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Ross Boulet" <ross AT rossb DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: system call
Date: Tue, 1 Mar 2005 04:19:11 -0600
Message-ID: <003001c51e48$23849fe0$6400000a@RossLap>
MIME-Version: 1.0
In-Reply-To: <20050301103835.0084b49c.gigy@freemail.it>
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j21AJoM2003097

> Thanks for your reply but it still do not work...
> the problem is thant under cygwin the execution of "dir"
> works fine but i have to run the program in an enviroment
> WITHOUT cygwin: it's in the DOS shell that the system()
> call do not works and return with code number 127.
> In the final application, i'll not use "dir" command, but
> another program.
> 
> Muzero
> 
> > On Mar  1 09:58, Muzero wrote:
> > > When i try to compile and execute a simple program
> like this:
> > >
> > > int main()
> > > {
> > > 	system("dir");
> > > 	return 0;
> > > }
> >
> > "dir" is a cmd.exe builtin.  Try `system("cmd /c dir");'
> >
> > Corinna
> >

Have you tried adding the -mno-cygwin option when you
compile the program.  This should eliminate the need for the
cygwin environment at run time.

Ross



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


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