in reply to Simplest Forking

Also if possible could you let me know how to detect how many threads are available (taking into account very unlikely single CPUs) and use of available ones?

Also should I worry about zombie processes?