I wrote a sample c++ program which forks a linux application (kcalc). I compiled this program using g++ and executed it. The kcalc application is launched. After closing the kcalc application using the quit button I am not getting the terminal. I need to press enter to return to the terminal. But If the kcalc application is called within the program without forking, it will return to the terminal. Could you please help me understand why forked process are not returned to the terminal after closing.