aboutsummaryrefslogtreecommitdiff
path: root/chatty.c
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-30 01:55:25 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-30 01:55:25 +0100
commit2ab4648096c23d274c8f74997e271ca5cdcc6cac (patch)
tree8b4a94c836149d10e6fbb433c564c0ab22c4231a /chatty.c
parentdd68df08748b9fd6c8e849e6403459d444a8fb5f (diff)
Added SIGSTOP handling for suspending on ctrl-z
Diffstat (limited to 'chatty.c')
-rw-r--r--chatty.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/chatty.c b/chatty.c
index e721a29..bd131a5 100644
--- a/chatty.c
+++ b/chatty.c
@@ -471,6 +471,13 @@ main(int argc, char** argv)
ninput--;
}
break;
+ case TB_KEY_CTRL_Z: {
+ pid_t pid = getpid();
+ tb_shutdown();
+ kill(pid, SIGSTOP);
+ tb_init();
+ } break;
+
case TB_KEY_CTRL_D:
case TB_KEY_CTRL_C:
quit = 1;