mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Add APE fexecve() support (#733)
This commit is contained in:
parent
b275e664ec
commit
ff9c15f48a
9 changed files with 191 additions and 29 deletions
|
@ -86,3 +86,14 @@ TEST(fexecve, memfd_create) {
|
|||
fexecve(fd, (char *const[]){0}, (char *const[]){0});
|
||||
EXITS(42);
|
||||
}
|
||||
|
||||
TEST(fexecve, APE) {
|
||||
if (!IsLinux() && !IsFreebsd()) return;
|
||||
testlib_extract("/zip/life-nomod.com", "life-nomod.com", 0555);
|
||||
SPAWN(fork);
|
||||
int fd = open("life-nomod.com", O_RDONLY);
|
||||
ASSERT_NE(-1, fd);
|
||||
if (fd == -1 && errno == ENOSYS) _Exit(42);
|
||||
fexecve(fd, (char *const[]){0}, (char *const[]){0});
|
||||
EXITS(42);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue