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]

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


Emrich Michael (QI/LBS3-Rt) wrote:
> 
> 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
> 

Cygwin b18 currently only supports 100 processes on the overall system
(not under a session leader).
I understood this limit will be the same in b19.

If you're compiling cygwin.dll yourself, try to raise the value of PSIZE
in winsup/winsup.h.

If you're using coolview and you want more than 16 telnet sessions
(which is the current limit), try raising
NTTYS in winsup/tty.h

Kees
-
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]