Doubt regarding wait fork

In reply to kranthi445:

In reply to Ravi007:
No. It wait for all the child process for finish

That is not correct.

9.6.1 Wait fork statement[br]
The wait fork statement blocks process execution flow until all immediate child subprocesses (processes created by the current process, excluding their descendants) have completed their execution.

The key phrase is immediate child subprocesses which includes active child processes that might have been spawned before calling run_t.