[Bug 235445] [PATCH] editors/nvi-devel: Avoid "Text file busy" error when editing a script

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Feb 3 00:52:40 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235445

            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 at FreeBSD.org
          Reporter: leres at freebsd.org
          Assignee: johans at FreeBSD.org
             Flags: maintainer-feedback?(johans at 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.

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


More information about the freebsd-ports-bugs mailing list