In reply to SHRI12326:
I’ll repeat this for the third time here.
The disable fork statements kills the children of the currently running thread. (i.e the thread executing the disable fork statement).
The thread where you execute the disable fork has no children. The fork/join you put inside task3 creates a child thread, but the disable is executed from the child. You can use a break statement to get out of your forever loop instead of the disable. Then there is no need for the fork inside task3.