Improve system call polyfills
- Polyfill open() w/ O_CLOEXEC on RHEL5 - Remove old workaround from rmdir() on the New Technology - preadv() and pwritev() are now smarter about demodernization - preadv() and pwritev() are now available on the New Technology
This commit is contained in:
@@ -66,8 +66,7 @@ int posix_spawn(int *pid, const char *path,
|
||||
}
|
||||
}
|
||||
if (file_actions) {
|
||||
p = *file_actions;
|
||||
while (*p != '\0') {
|
||||
for (p = *file_actions; *p; p = strchr(p, ')') + 1) {
|
||||
if (!strncmp(p, "close(", 6)) {
|
||||
if (sscanf(p + 6, "%d)", &fd) != 1) _exit(127);
|
||||
if (close(fd) == -1) _exit(127);
|
||||
@@ -92,7 +91,6 @@ int posix_spawn(int *pid, const char *path,
|
||||
} else {
|
||||
_exit(127);
|
||||
}
|
||||
p = strchr(p, ')') + 1;
|
||||
}
|
||||
}
|
||||
if (attrp) {
|
||||
|
||||
Reference in New Issue
Block a user