Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" To: References: <988BE481ACC95C429DCB909F74A3163A05D660 AT exchange-il> Subject: Re: System() command Date: Tue, 7 Jan 2003 07:39:59 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: 7bit 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 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/