child Process ended before Parent process

afaq

New Member
Joined
Nov 6, 2022
Messages
1
Reaction score
0
Credits
14
I wrote a code to under stand the work of process by call system call with fork() function
Here is this code
1667992862154.png


Here is the out-put:
1667993033134.png


without wait() function it should execute first parent process completely then it execute child process. But here the child process execute first completely after that parent process.
If I run the same code on Ubuntu it's output is change. why this thing is happen in kali Linux.
Anyone guide me
 

Staff online


Latest posts

Top