If you do have the bug, then workaround it like described in the FAQ:
Subject: 06.01 What to do with "Problems with edit - draft removed".
From: John Romine <jromine at ics.uci.edu>
Date: Mon, 1 May 1995 00:00:00 -0800
If your users are using an AT&T version of "vi", it's exiting with
non-zero status (supposedly a count of the "errors" during the
edit). Move "vi" to "broken_vi" and put it its place :
#! /bin/sh
/usr/ucb/broken_vi "$@"
exit 0
Alternatively, compile MH with the ATTVIBUG option.
Then complain to your vendor that "vi" is broken, and they shouldfix it.
btw: ex-vi does not have this bug.
*/
#define BUILTIN_FTP 1
-/*
- * Define to 1 if your vi has ATT bug, such that it returns
- * non-zero exit codes on `pseudo-errors'.
- */
-#undef ATTVIBUG
-
/***** END USER CONFIGURATION SECTION *****/
@TOP@
default:
if ((status = pidwait(pid, NOTOK))) {
-#ifdef ATTVIBUG
- if ((cp = mhbasename(*ed)) && strcmp(cp, "vi") == 0 &&
- (status & 0x00ff) == 0)
- status = 0;
- else {
-#endif
if (((status & 0xff00) != 0xff00)
&& (!reedit || (status & 0x00ff))) {
if (!use && (status & 0xff00) && (rename(file, cp = m_backup (file)) != NOTOK)) {
}
status = -2; /* maybe "reedit ? -2 : -1"? */
break;
-#ifdef ATTVIBUG
- }
-#endif
}
reedit++;