| vijirin (13) | |||
|
Dear All, 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. Attached is the sample code used for execution.
Regards Viji | |||
|
|
|||
| kbw (5520) | |
| The parent should wait for the child to complete. See waitpid(). | |
|
|
|
| ne555 (4385) | |||
|
> 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 Try enter a command.
Because you didn't wait, kcalc becomes an orphan. That means that you do have a terminal, even with kcalc open | |||
|
Last edited on
|
|||