Child and parent process execution is parallel and which starts first depends on OS scheduling. But what can be done to start child always before the parent?
This is
In linux if you want the child process run first, you need to use kernel.sched_child_runs_first sysctl parameter
kernel.sched_child_runs_first