unix: remove unused uv__dup() function

It was introduced in commit abdc3efffe ("unix: add uv__dup()") from
January 2012 to break ground for commit e34dc13496 ("unix: implement
uv_import() and uv_export()").

Those APIs were removed not much later but I forgot to remove the
helper function as well. Better late than never, eh?

PR-URL: https://github.com/libuv/libuv/pull/2043
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
Ben Noordhuis 2018-10-17 20:26:03 +02:00
parent ba7802315d
commit fab6e64b39
2 changed files with 0 additions and 22 deletions

View File

@ -636,27 +636,6 @@ int uv__cloexec_fcntl(int fd, int set) {
}
/* This function is not execve-safe, there is a race window
* between the call to dup() and fcntl(FD_CLOEXEC).
*/
int uv__dup(int fd) {
int err;
fd = dup(fd);
if (fd == -1)
return UV__ERR(errno);
err = uv__cloexec(fd, 1);
if (err) {
uv__close(fd);
return err;
}
return fd;
}
ssize_t uv__recvmsg(int fd, struct msghdr* msg, int flags) {
struct cmsghdr* cmsg;
ssize_t rc;

View File

@ -185,7 +185,6 @@ int uv__nonblock_fcntl(int fd, int set);
int uv__close(int fd); /* preserves errno */
int uv__close_nocheckstdio(int fd);
int uv__socket(int domain, int type, int protocol);
int uv__dup(int fd);
ssize_t uv__recvmsg(int fd, struct msghdr *msg, int flags);
void uv__make_close_pending(uv_handle_t* handle);
int uv__getiovmax(void);