X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=b8e607714d2b87863ac4e8ef3b3b68164e1c6ebd;hb=7e19e116764d2651721cb9062ccaac31b0c771f2;hp=574dbeee866f2704cb6b3bd971d0089af47f258d;hpb=67d0cb65d0794e2d91e72e5fa1e3612172e5812e;p=st.git diff --git a/st.c b/st.c index 574dbee..b8e6077 100644 --- a/st.c +++ b/st.c @@ -731,8 +731,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); } @@ -1452,7 +1454,8 @@ tsetattr(int *attr, int l) } else { fprintf(stderr, "erresc(default): gfx attr %d unknown\n", - attr[i]), csidump(); + attr[i]); + csidump(); } break; } @@ -2261,7 +2264,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();