svn commit: r354732 - head/sys/compat/linux

Edward Tomasz Napierala trasz at FreeBSD.org
Fri Nov 15 16:21:47 UTC 2019


Author: trasz
Date: Fri Nov 15 16:21:46 2019
New Revision: 354732
URL: https://svnweb.freebsd.org/changeset/base/354732

Log:
  Support O_CLOEXEC in linux(4) open(2) and openat(2).
  
  Reviewed by:	emaste
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D21966

Modified:
  head/sys/compat/linux/linux_file.c

Modified: head/sys/compat/linux/linux_file.c
==============================================================================
--- head/sys/compat/linux/linux_file.c	Fri Nov 15 13:45:38 2019	(r354731)
+++ head/sys/compat/linux/linux_file.c	Fri Nov 15 16:21:46 2019	(r354732)
@@ -109,6 +109,8 @@ linux_common_open(struct thread *td, int dirfd, char *
 		bsd_flags |= O_APPEND;
 	if (l_flags & LINUX_O_SYNC)
 		bsd_flags |= O_FSYNC;
+	if (l_flags & LINUX_O_CLOEXEC)
+		bsd_flags |= O_CLOEXEC;
 	if (l_flags & LINUX_O_NONBLOCK)
 		bsd_flags |= O_NONBLOCK;
 	if (l_flags & LINUX_FASYNC)


More information about the svn-src-all mailing list