<<< Date Index >>>     <<< Thread Index >>>

Re: [ANNOUNCE] mutt 1.5.16 released



On Wed, Jun 13, 2007 at 04:31:22PM -0600, Kyle Wheeler wrote:
> On Wednesday, June 13 at 06:03 PM, quoth Jean-Pierre Radley:
> >Under Posix 2004 rules, I'm not sure what exit status vi will 
> >present, but the vi on all variants of Unix from SCO, as well as the 
> >vi on Solaris 10, adhere to the Posix 2001 standard, which includes 
> >in the clause 'consequences of errors' "... or when an error is 
> >detected that is a consequence of data (not) present in the file, 
> >..." and "ex/vi shall terminate with a nonzero exit status."

The fact is, exit status is application-dependent on Unix systems,
POSIX or not.  Even if POSIX defines how vi should behave on exit,
the operating system has no means to enforce this behavior, and
authors of vi clones need not adhere to it if they so choose.  For
that matter, there is no reason the user is required to run vi or any
POSIX-compliant program as Mutt's editor.  A user could choose to use
a script which modifies a template as his editor, and that script
might return the number of changes it made, the day of the week, or
whatever other value the author decided to pass back to the OS.

Mutt can not know what the exit status of $EDITOR will indicate, and
as such Mutt MUST ignore it.

> Then again, what is an error in an interactive program?

Exactly.  Presumably, the user will be able to identify a failure of
the editor, and take actions to correct before the editor finishes.
 
> Do you have any suggested alternative solution for the problem 
> reported in that bugreport? http://dev.mutt.org/trac/ticket/1638

Yes: do nothing.  The only thing Mutt should care about is whether the
temp file changed since Mutt created it.

Not detecting a failure in the editor is NOT a bug.  It's the only
sensible behavior.  The OP's problem proves this.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.

Attachment: pgpt8VmfLk6xS.pgp
Description: PGP signature