I am using ‘tfork()’ under QNX 4.25 (yes I am planning on porting to
RTP to get real threads ). The example in the doc shows calling ‘tfork’ with a
stack size of 2000 bytes. I copied this but crashed horribly when
my ‘thread’ executed ‘gethostbyname()’. I increased the stack size to
20000 bytes and all worked fine.
My question is how does one know a good size to make the stack? In this
case 2000 was too small. How can I tell the stack size of a QNX
process to get some ideas of what’s normal?
Thanks.