From: Stefan Sperling Subject: Re: vi struggling to save commit messages To: "Todd C. Miller" Cc: Ted Bullock , gameoftrees@openbsd.org Date: Wed, 8 Mar 2023 22:29:50 +0100 On Wed, Mar 08, 2023 at 02:21:04PM -0700, Todd C. Miller wrote: > On Wed, 08 Mar 2023 22:19:35 +0100, Stefan Sperling wrote: > > > I can reproduce this with Vim on an NFS share between two amd64 systems. > > > > Running fsync() before starting the editor fixes it for me. > > It should be sufficient to just close the fd first. Yes, this works, too. ok by me. I would still add the missing error handling around write and close in histedit_edit_logmsg() though. But I can extract that from my diff after yours is in if you prefer.