I have a process, and when I issue ctrl+c in the terminal, it closes the terminal window completely, anybody know why that might be happening?
This is how the process is now started:
exec "$(dirname "$0")/suman-shell" # a
it used to be started like so, and there was no problem:
"./$(dirname "$0")/suman-shell" # b
it does look like using exec is what is causing the terminal window to close, so why does a close the terminal window, but not b, after receiving a signal?
execand is killed withCtrl-C, then there is no shell to return to. In this case the terminal emulator quits, just like it quits when you exit a shell running in it.straceto the terminal emulator and to the application. Then you should see what happens. I assume that either the process has been started withexecfrom the running shell (so that the terminal window would close after the process exits normally, too) or that the signal handler (whyever) kills the terminal emulator.exec! I would never have figured that out if it weren't for these comments - any idea whyaandbbehave differently? (see updated question).