This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: Problem with system()
- To: cygwin at sourceware dot cygnus dot com
- Subject: Re: Problem with system()
- From: Chris Faylor <cgf at cygnus dot com>
- Date: Wed, 26 Jul 2000 16:01:14 -0400
- References: <OF4C18139D.06A40DE5-ON85256928.006D55BB@predictive.com>
- Reply-To: cygwin at sources dot redhat dot com
On Wed, Jul 26, 2000 at 03:56:42PM -0400, Glenn.Davis@predictive.com wrote:
>Hi,
>I am trying to run a simple program that just uses the system() call, but
>I can't get it to work.
>the call I am using is system("dir");
>
>Am I doing something wrong?
"dir" is not a cygwin command. It's a function of your command shell.
You probably want to do one of:
- system ("ls"); /* The cygwin way */
- system ("command /c dir"); /* Windows 95 */
- system ("cmd /c dir"); /* Windows NT */
cgf
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com