svn commit: r496474 - in head/editors/nvi-devel: . files
Craig Leres
leres at FreeBSD.org
Thu Mar 21 17:12:17 UTC 2019
Author: leres
Date: Thu Mar 21 17:12:16 2019
New Revision: 496474
URL: https://svnweb.freebsd.org/changeset/ports/496474
Log:
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.
PR: 235445
Approved by: johans (maintainer timeout, 6 weeks), ler (mentor, implicit)
Added:
head/editors/nvi-devel/files/patch-common_exf.c (contents, props changed)
Modified:
head/editors/nvi-devel/Makefile
Modified: head/editors/nvi-devel/Makefile
==============================================================================
--- head/editors/nvi-devel/Makefile Thu Mar 21 16:44:35 2019 (r496473)
+++ head/editors/nvi-devel/Makefile Thu Mar 21 17:12:16 2019 (r496474)
@@ -3,7 +3,7 @@
PORTNAME= nvi
PORTVERSION= 1.81.6
-PORTREVISION= 10
+PORTREVISION= 11
CATEGORIES= editors
MASTER_SITES= ftp://ftp.stack.nl/pub/users/johans/nvi/
Added: head/editors/nvi-devel/files/patch-common_exf.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/editors/nvi-devel/files/patch-common_exf.c Thu Mar 21 17:12:16 2019 (r496474)
@@ -0,0 +1,11 @@
+--- ../common/exf.c.orig 2007-11-18 16:41:42 UTC
++++ ../common/exf.c
+@@ -392,7 +392,7 @@ postinit:
+ * an error.
+ */
+ if (rcv_name == NULL && ep->refcnt == 0) {
+- if ((ep->fd = open(oname, O_RDWR)) == -1)
++ if ((ep->fd = open(oname, O_RDONLY)) == -1)
+ goto no_lock;
+
+ switch (file_lock(sp, oname, &ep->fcntl_fd, ep->fd, 1)) {
More information about the svn-ports-all
mailing list