From 3061ebd7e17053bb0a928eda868136a4d5f59997 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 4 Nov 2018 14:30:56 +0100 Subject: st: small typofix in comment --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'st.c') diff --git a/st.c b/st.c index a6310f7..bc761ba 100644 --- a/st.c +++ b/st.c @@ -2388,7 +2388,7 @@ eschandle(uchar ascii) case 'Z': /* DECID -- Identify Terminal */ ttywrite(vtiden, strlen(vtiden), 0); break; - case 'c': /* RIS -- Reset to inital state */ + case 'c': /* RIS -- Reset to initial state */ treset(); resettitle(); xloadcols(); -- cgit v1.2.3-18-g5258 From e651f316420d4366605cd5614b4b6ede46ea451a Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Tue, 11 Dec 2018 11:43:03 +0200 Subject: output child WEXITSTATUS/WTERMSIG on abnormal termination --- st.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'st.c') diff --git a/st.c b/st.c index bc761ba..5a2a898 100644 --- a/st.c +++ b/st.c @@ -738,8 +738,10 @@ sigchld(int a) if (pid != p) return; - if (!WIFEXITED(stat) || WEXITSTATUS(stat)) - die("child finished with error '%d'\n", stat); + if (WIFEXITED(stat) && WEXITSTATUS(stat)) + die("child exited with status %d\n", WEXITSTATUS(stat)); + else if (WIFSIGNALED(stat)) + die("child terminated due to signal %d\n", WTERMSIG(stat)); exit(0); } -- cgit v1.2.3-18-g5258 From 7a1a92ff3f331047245837ddd055298ceb013a62 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Tue, 11 Sep 2018 19:06:35 +0200 Subject: small code-style fix --- st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'st.c') diff --git a/st.c b/st.c index 5a2a898..9fd04bd 100644 --- a/st.c +++ b/st.c @@ -1506,7 +1506,8 @@ tsetattr(int *attr, int l) } else { fprintf(stderr, "erresc(default): gfx attr %d unknown\n", - attr[i]), csidump(); + attr[i]); + csidump(); } break; } -- cgit v1.2.3-18-g5258