Allow MAP_POPULATE under pledge()

This commit is contained in:
Justine Tunney 2023-12-03 18:00:25 -08:00
parent 53357aa26a
commit cd52c59552
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
6 changed files with 3 additions and 305 deletions

View file

@ -3792,24 +3792,5 @@ construct_command_argv (char *line, char **restp, struct file *file,
return argv;
}
#if !defined(HAVE_DUP2) && !defined(_AMIGA)
int
dup2 (int old, int new)
{
int fd;
(void) close (new);
EINTRLOOP (fd, dup (old));
if (fd != new)
{
(void) close (fd);
errno = EMFILE;
return -1;
}
return fd;
}
#endif /* !HAVE_DUP2 && !_AMIGA */
/* On VMS systems, include special VMS functions. */