shm_open2: Implement SHM_GROW_ON_WRITE

Lack of SHM_GROW_ON_WRITE is actively breaking Python's memfd_create tests,
so go ahead and implement it. A future change will make memfd_create always
set SHM_GROW_ON_WRITE, to match Linux behavior and unbreak Python's tests
on -CURRENT.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D25502
This commit is contained in:
Kyle Evans 2020-07-10 00:43:45 +00:00 committed by Sebastian Huber
parent 1a840361e8
commit c95c267a46
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,7 @@
* shmflags for shm_open2()
*/
#define SHM_ALLOW_SEALING 0x00000001
#define SHM_GROW_ON_WRITE 0x00000002
/*
* Flags for memfd_create().