This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: System() command
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/