[Midnightbsd-cvs] src [8797] trunk/sys: stop translating the ERRESTART error from the open(2) into EINTR.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 25 23:25:36 EDT 2016
Revision: 8797
http://svnweb.midnightbsd.org/src/?rev=8797
Author: laffer1
Date: 2016-09-25 23:25:36 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
stop translating the ERRESTART error from the open(2) into EINTR. Posix requires that open(2) is restartable for SA_RESTART.
Modified Paths:
--------------
trunk/sys/fs/devfs/devfs_vnops.c
trunk/sys/kern/vfs_syscalls.c
Modified: trunk/sys/fs/devfs/devfs_vnops.c
===================================================================
--- trunk/sys/fs/devfs/devfs_vnops.c 2016-09-26 03:23:43 UTC (rev 8796)
+++ trunk/sys/fs/devfs/devfs_vnops.c 2016-09-26 03:25:36 UTC (rev 8797)
@@ -1089,8 +1089,11 @@
vn_lock(vp, vlocked | LK_RETRY);
dev_relthread(dev, ref);
- if (error)
+ if (error != 0) {
+ if (error == ERESTART)
+ error = EINTR;
return (error);
+ }
#if 0 /* /dev/console */
KASSERT(fp != NULL, ("Could not vnode bypass device on NULL fp"));
Modified: trunk/sys/kern/vfs_syscalls.c
===================================================================
--- trunk/sys/kern/vfs_syscalls.c 2016-09-26 03:23:43 UTC (rev 8796)
+++ trunk/sys/kern/vfs_syscalls.c 2016-09-26 03:25:36 UTC (rev 8797)
@@ -1167,8 +1167,6 @@
fdclose(fdp, fp, indx, td);
fdrop(fp, td);
- if (error == ERESTART)
- error = EINTR;
return (error);
}
td->td_dupfd = 0;
More information about the Midnightbsd-cvs
mailing list