kconfig: handle SIGINT in menuconfig

I recently got bitten in the ass when pressing Ctrl-C and lost all my current
configuration changes. This patch captures SIGINT and allows the user to save
any changes.

Some code refactoring was made in order to handle the exit behavior.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
1 file changed