- if (((status & 0xff00) != 0xff00) &&
- (!reedit || (status & 0x00ff))) {
- if (!use && (status & 0xff00) && (rename(file, cp = m_backup(file)) != NOTOK)) {
- advise(NULL, "problems with edit--draft left in %s", cp);
- } else {
- advise(NULL, "problems with edit--%s preserved", file);
- }
+ if ((status & 0xff00) == 0xff00) {
+ /* cmd not found or pidwait() failed */
+ status = -1;
+ break;
+ }
+ if (status & 0x00ff) {
+ /* terminated by signal */
+ advise(NULL, "%s terminated by signal %d",
+ *ed, status & 0x7f);
+ } else {
+ /* failure exit */
+ advise(NULL, "%s exited with return code %d",
+ *ed, (status & 0xff00) >> 8);