This is the mail archive of the cygwin@sourceware.cygnus.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]

Please Help: system() Bug in cygnus-2.7.2-970404


Hello,
when you call system() more than 98 times you get the following message.
0
1
2
.......until..
98
(G:\watchdog\pars\tt.exe 1000) In cygwin_except_handler
(G:\watchdog\pars\tt.exe 1000) Exception trapped!
(G:\watchdog\pars\tt.exe 1000) exception C0000005 at 10018D62
(G:\watchdog\pars\tt.exe 1000) exception: ax 44C bx A000004 cx 35201 dx
A000004
(G:\watchdog\pars\tt.exe 1000) exception: si 0 di 240EC28 bp 240EC18 sp
240EC0C
(G:\watchdog\pars\tt.exe 1000) exception is: STATUS_ACCESS_VIOLATION
(G:\watchdog\pars\tt.exe 1000) Stack trace:
(G:\watchdog\pars\tt.exe 1000) frame 0: sp = 0x240EA40, pc = 0x1000CEC2
(G:\watchdog\pars\tt.exe 1000) frame 1: sp = 0x240EA5C, pc = 0x77FA4512
... and os on.....

The following Program produces that error:
#include <stdio.h>
main()
{  
  char syscmd[124];
  int i=0;

  for(i=0;i<1024;i++) {
    sprintf(syscmd,"echo %d",i);
    system(syscmd);
  }
}

Has somebody a solution to this Problem

With regards

Michael Emrich
_________________________________________________________
Robert Bosch GmbH ; QI/LBS3-Rt; Postfach 1342; 72703 Reutlingen
Tel: (07121)/35-3261; Fax: -3150; Internet: Michael.Emrich@pcm.bosch.de


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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