This is the mail archive of the cygwin@sources.redhat.com 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]

System call


Hi,

May I know the system function working on the Cygwin system?
I have a C program with system function working fine on UNIX but doesn't 
work on NT after I compliled it with Cygwin.

I have tried the following program, it printed out "errno=127" and didn't 
run the dir command:

# include <stdlib.h>

int main()
{
  int errno;

  errno=system("dir");
  printf("errno=%ld\n", errno);

  return 1;
  }

I tried to replace dir with dir>filelist and filelist wasn't created and I 
got the same error code. Same result for non-existing command.

Could you please check it out and let me know your finding?


Many thanks.

Zhong Gang
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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


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