Subject: Re: How to spawn from big-stack program
From: Klaus Grue <[email-masked]>
To: Dave Korn <[email-masked]>
Cc: [email-masked]
Date: Sun, 5 Jul 2009 15:45:24 +0200 (CEST)
List-Id: <cygwin.cygwin.com>

Hi Dave,

>> Can anyone tell me how to invoke a program from a big-stack program ...
> The problem is not spawning the new executable.  The problem is ...
Thanks for the explanation.

> ...
> 955 cygthread *h = new cygthread (proc_waiter, 0, this, "proc_waiter");
> ...
And thanks for the very accurate file/line references into the Cygwin 
source. I first tried making a patch but lost track in spawn.cc.

> It's possible we could tweak cygwin to not use the default thread stack size
> for these internal threads.

Sounds like a good solution.

> If you want a workaround, you could try leaving the default thread size in
> your executable, and in your main() function use pthread_create to spawn a
> worker thread to do the real processing, having set a large stacksize for it
> using the related pthread_attr_setstacksize function.

I will try that.

>> On the Vista machine I did
>>   cygcheck -s -v -r > cygcheck.out
>> I stopped it after it had generated 10MB of output...

> Hmm, are you running with a slightly outdated version? ...

Maybe - but then that would be a problem in itself: I installed Cygwin 
on my Vista machine yesterday by clicking setup.exe on cygwin.com. That 
machine has never run Cygwin before, so my cygcheck must be the cygcheck 
of yesterday.

In any case: thanks for the help.

Cheers,
Klaus

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple