Add memfd fexecve zipos support (#752)

This commit is contained in:
Gavin Hayes 2023-03-29 21:16:46 -04:00 committed by GitHub
parent ba42248575
commit 669b4c5f19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 102 additions and 22 deletions

View file

@ -128,3 +128,14 @@ TEST(fexecve, ziposAPE) {
EXITS(42);
close(fd);
}
TEST(fexecve, ziposAPEHasZipos) {
if (!IsLinux() && !IsFreebsd()) return;
int fd = open("/zip/zipread.com", O_RDONLY);
SPAWN(fork);
ASSERT_NE(-1, fd);
if (fd == -1 && errno == ENOSYS) _Exit(42);
fexecve(fd, (char *const[]){0}, (char *const[]){0});
EXITS(42);
close(fd);
}