[comp.mail.mh] odd whatnow behaviour

partain@cs.utk.edu (David L. Partain) (01/31/91)

We are having occasional annoying behaviour by whatnow that I thought
someone might have a fix for.  Occasionally, on a Sun (3/60 or Sparc)
running sunos4.1 and using mh 6.7 a draft will be deleted after an 
edit with the following message:

whatnow: problems with edit--/zaffer/homes/partain/Mail/draft deleted

We found the code for the message, but we can't really find the source
of the problem.  We suspect that it might in fact be vi returning a
wacked out status.  Again, this is only occasional, but troublesome.  Has
anyone else experienced this?  Does anyone have any idea what it might
be.  Any help would be appreciated.

-- 
-- 
David Partain              |  partain@cs.utk.edu
Dept. of Comp. Science     |  
University of Tennessee    |  work phone:  +1 615 974 8990

jromine@buckaroo.ics.uci.edu (John Romine) (01/31/91)

partain@cs.utk.edu (David L. Partain) writes:
>...running sunos4.1 ...  We suspect that vi [might be] returning a
>wacked out status.

You're right, it is a problem with "vi".  Under Sun OS 4.1, "vi"
returns the number of "errors" as its exit status.  This confuses
MH, as well as programs like "vipw".  An error would be something
like ":set qwert".

I've reported it to Sun: they say they inherited the behavior from the
new SYS5 "vi".  They're going to consider changing it back as an
"enhancement".  You might want to report it to your Sun rep as a bug;
perhaps doing that would help them decide whether to change it back.

Until then, I have a fix in the currently-in-progress patch for MH.  I
was hoping to include a few more fixes, but I guess I'll bundle up what
I have and send it out in a day or so.

We also considered replacing "vi" with a script which called "vi" and
then did "exit 0" -- this would be a better general solution if Sun
won't fix "vi" to call exit(0).
--
John Romine

jromine@buckaroo.ics.uci.edu (John Romine) (02/28/91)

partain@cs.utk.edu (David L. Partain) writes:
>We are having occasional annoying behaviour by whatnow that I thought
>someone might have a fix for...  We suspect that it might in fact be
>vi returning a wacked out status.

You are correct.  Complain to your vendor about "vi".  There will be a
work-around in the next MH patch.
--
John Romine

brnstnd@kramden.acf.nyu.edu (Dan Bernstein) (02/28/91)

In article <27CBEB10.16195@ics.uci.edu> jromine@ics.uci.edu (John Romine) writes:
> partain@cs.utk.edu (David L. Partain) writes:
> >We are having occasional annoying behaviour by whatnow that I thought
> >someone might have a fix for...  We suspect that it might in fact be
> >vi returning a wacked out status.
> You are correct.  Complain to your vendor about "vi".  There will be a
> work-around in the next MH patch.

Why not set the editor (prompter-next, or whatever) to a shell script
that always exits 0?

#!/bin/sh
vi ${1+"$@"}
exit 0

---Dan