X-Git-Url: https://git.danieliu.xyz/?p=st.git;a=blobdiff_plain;f=st.c;h=b8e607714d2b87863ac4e8ef3b3b68164e1c6ebd;hp=46cf2da6999592dd9f807b41d803cbf5c453f339;hb=096b125db7ec254002a049ef3a5c1204bd7f0ad9;hpb=30ec9a3dc354ab1a561c9edd808046bdf5dfd392 diff --git a/st.c b/st.c index 46cf2da..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); } @@ -2262,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();