From 84875e21ab19b4357a1fa75abbbb378fa45a20e2 Mon Sep 17 00:00:00 2001 From: Semih Kaplan Date: Wed, 29 Nov 2023 22:02:52 +0300 Subject: [PATCH 1/6] README.md edited. --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9ce21a53..4c46f6fc 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ -SL(1): Cure your bad habit of mistyping -======================================= +SL(1): Cure your bad habit of mistyping even more +================================================= -SL (Steam Locomotive) runs across your terminal when you type "sl" as -you meant to type "ls". It's just a joke command, and not useful at -all. +SL (Steam Locomotive), with this version, is even more annoying +because we fixed some bypass methods to skip the animation. Copyright 1993,1998,2014 Toyoda Masashi (mtoyoda@acm.org) From 86b8c57de8707b1e06e9c2a637f7036a5fab7a68 Mon Sep 17 00:00:00 2001 From: Semih Kaplan Date: Wed, 29 Nov 2023 23:54:41 +0300 Subject: [PATCH 2/6] Other POSIX signals ignored for better key handle. --- .gitignore | 1 + sl.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index b2bf82b1..c79ee479 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /sl +/.vscode \ No newline at end of file diff --git a/sl.c b/sl.c index e549ac8c..65a11082 100644 --- a/sl.c +++ b/sl.c @@ -90,7 +90,18 @@ int main(int argc, char *argv[]) } } initscr(); + + /* Ignore following signals*/ + + /* Interrupt from keyboard, Control-C */ signal(SIGINT, SIG_IGN); + + /* Quit from keyboard, Control-\ */ + signal(SIGQUIT, SIG_IGN); + + /* Stop process issued from tty */ + signal(SIGTSTP, SIG_IGN); + noecho(); curs_set(0); nodelay(stdscr, TRUE); From 6a65d9d61653e9dcbaaa77061c9c4f8ce02f81be Mon Sep 17 00:00:00 2001 From: Semih Kaplan Date: Thu, 30 Nov 2023 00:05:58 +0300 Subject: [PATCH 3/6] README.md changed back to original --- .gitignore | 3 +-- README.md | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index c79ee479..82d2c2e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/sl -/.vscode \ No newline at end of file +/sl \ No newline at end of file diff --git a/README.md b/README.md index 4c46f6fc..9ce21a53 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -SL(1): Cure your bad habit of mistyping even more -================================================= +SL(1): Cure your bad habit of mistyping +======================================= -SL (Steam Locomotive), with this version, is even more annoying -because we fixed some bypass methods to skip the animation. +SL (Steam Locomotive) runs across your terminal when you type "sl" as +you meant to type "ls". It's just a joke command, and not useful at +all. Copyright 1993,1998,2014 Toyoda Masashi (mtoyoda@acm.org) From bf88b43b89612ac55449aef9e640be146245b99a Mon Sep 17 00:00:00 2001 From: Semih Kaplan Date: Thu, 30 Nov 2023 00:09:03 +0300 Subject: [PATCH 4/6] .gitignore reverted. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 82d2c2e3..b2bf82b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/sl \ No newline at end of file +/sl From 90fae078425174c898a4124d97d28ccfba1a7e54 Mon Sep 17 00:00:00 2001 From: Semih Kaplan Date: Thu, 30 Nov 2023 00:12:29 +0300 Subject: [PATCH 5/6] SIGSTOP is also ignored. --- sl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sl.c b/sl.c index 65a11082..f73a0feb 100644 --- a/sl.c +++ b/sl.c @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) } } initscr(); - + /* Ignore following signals*/ /* Interrupt from keyboard, Control-C */ @@ -99,6 +99,9 @@ int main(int argc, char *argv[]) /* Quit from keyboard, Control-\ */ signal(SIGQUIT, SIG_IGN); + /* Stop process execution, Ctrl-Z */ + signal(SIGSTOP, SIG_IGN); + /* Stop process issued from tty */ signal(SIGTSTP, SIG_IGN); From c049f18162f0e779dded3e5ba12f029123afcb21 Mon Sep 17 00:00:00 2001 From: Semih Kaplan Date: Thu, 30 Nov 2023 00:22:32 +0300 Subject: [PATCH 6/6] Typo fixed. --- sl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sl.c b/sl.c index f73a0feb..3b0a62d4 100644 --- a/sl.c +++ b/sl.c @@ -91,7 +91,7 @@ int main(int argc, char *argv[]) } initscr(); - /* Ignore following signals*/ + /* Ignore following signals */ /* Interrupt from keyboard, Control-C */ signal(SIGINT, SIG_IGN);