|There's more than one way to do things
How to create the threads using forks. I should create a 5 threads and all the 5 threads should print numbers in sequence. i.e How can I lock one thread for writing while others for processing the other threads. When one thread is finished completion another thread should write to the log file. Please help me how can I do this.