delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
Message-ID: | <002701c2b663$0973d980$3c01a8c0@jungle> |
From: | "Jim" <jbuckeyne AT greater DOT net> |
To: | <cygwin AT cygwin DOT com> |
References: | <988BE481ACC95C429DCB909F74A3163A05D660 AT exchange-il> |
Subject: | Re: System() command |
Date: | Tue, 7 Jan 2003 07:39:59 -0800 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2800.1106 |
I have this very simple C program: #include <stdlib.h> int main() { char a[] = "echo echo testing 123"; -- char a[] = "cmd.exe -c echo echo test 123"; // I thought there was a shell( char* ) which invoked the command in the // current shell? system just forks and execs a process, though hmm // I suppose echo is a process ? system(a); return 0; } >I compile it with gcc and everything works fine, until I run it under Win2K's cmd.exe: the program just exits and does nothing. >I have set up the PATH environment variable, and it still doesn't work. >Any ideas? >Maor Avni -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |