The program most likely gets stuck on the system call.
You are printing out text without the trailing newline, so it will be kept in the buffer, until a newline is printed, which you do after the system
call.
5
solved While true not working [duplicate]