System call

Chris Faylor cgf@cygnus.com
Mon Aug 7 13:16:00 GMT 2000


On Mon, Aug 07, 2000 at 10:21:22AM -0400, DJ Delorie wrote:
>>   errno=system("dir");
>
>There is no program called "dir" anywhere on your computer.  No
>dir.exe, no dir.com.  Only the command shell knows how to run "dir"
>(and other built-ins).  So, if you want to do a "dir" you must tell
>the command shell to do it, either with system("cmd /c dir") or system
>("command /c dir").

Also, make sure that you have a "/bin/sh" on your system.

The system() function uses /bin/sh to run programs.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list