This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: System Calls

On Tue, Aug 06, 2002 at 06:23:30PM -0400, Murdoch, Matthew wrote:
> Hi list,
> I am fairly new to cygwin I have a fairly trivial question.  I am trying to
> make a system call using the system function in C.   I have read some of the
> previous postings on the newsgroup, but I am still stuck.   I am trying to
> do the following command, which calls an executable file and supplies it
> with an input file.  It then pipes the output to an otuput file.   
> system("cmd /c c:\"users\"mmurdoch\"ACE\"sixs <
> c:\"users\"mmurdoch\"ACE\"sixSIn.txt
>          > c:\"users\"mmurdoch\"ACE\"sixSOut.txt");
> I do have the "sh.exe" file in my \bin directory.    
> Thanks in advance for the help

What exact error do you see?  "I have a problem" isn't helpful
at all.

What are these \" ?  Don't you mean \\ ?
Why are you running cmd to call the application?  Why not call it

  system ("/cygdrive/c/users/mmurdoch/ACE/sixs \
           < /cygdrive/c/users/mmurdoch/ACE/sixSIn.txt \
	   > /cygdrive/c/users/mmurdoch/ACE/sixSOut.txt")


Or write a shell script and call that?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]