Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Feb 2019 00:52:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 235445] [PATCH] editors/nvi-devel: Avoid "Text file busy" error when editing a script
Message-ID:  <bug-235445-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235445

            Bug ID: 235445
           Summary: [PATCH] editors/nvi-devel: Avoid "Text file busy"
                    error when editing a script
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: johans@FreeBSD.org
          Reporter: leres@freebsd.org
          Assignee: johans@FreeBSD.org
             Flags: maintainer-feedback?(johans@FreeBSD.org)

I found that unlike the base vi (nvi 2.1.3), nvi-devel calls flock() on a
writable file descriptor. This has the unfortunately side effect of causing=
 the
"Text file busy" error when you edit a script in one window and try to run =
it
in another.

The fix is to change the initial open() just prior to calling file_lock() in
file_init() to use O_RDONLY instead of O_RDWR. This does not impact nvi's
ability to write files, nvi creates a new file when writing.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235445-7788>