diff options
| author | Jason Evans <jasone@FreeBSD.org> | 2000-01-12 09:23:48 +0000 |
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 2000-01-12 09:23:48 +0000 |
| commit | 929273386f6e688c008b15fd24932df2ed7e7172 (patch) | |
| tree | b3edfb3b0b6bdadce3b9cf019cabf1218f08038d /lib/libc/yp | |
| parent | f3d5d34b459fcd295a618227c37e2bacae1cdf67 (diff) | |
Notes
Diffstat (limited to 'lib/libc/yp')
| -rw-r--r-- | lib/libc/yp/yplib.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c index f5f348b89e76..8fc1d5625148 100644 --- a/lib/libc/yp/yplib.c +++ b/lib/libc/yp/yplib.c @@ -350,7 +350,7 @@ _yp_dobind(dom, ypdb) ysd->dom_vers = 0; ysd->dom_client = NULL; sock = dup2(save, sock); - close(save); + _libc_close(save); } } @@ -373,10 +373,10 @@ again: ysd->dom_socket = -1; } snprintf(path, sizeof(path), "%s/%s.%d", BINDINGDIR, dom, 2); - if( (fd=open(path, O_RDONLY)) == -1) { + if((fd = _libc_open(path, O_RDONLY)) == -1) { /* no binding file, YP is dead. */ /* Try to bring it back to life. */ - close(fd); + _libc_close(fd); goto skipit; } if( flock(fd, LOCK_EX|LOCK_NB) == -1 && errno==EWOULDBLOCK) { @@ -391,7 +391,7 @@ again: r = readv(fd, iov, 2); if(r != iov[0].iov_len + iov[1].iov_len) { - close(fd); + _libc_close(fd); ysd->dom_vers = -1; goto again; } @@ -405,12 +405,12 @@ again: *(u_short *)&ybr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port; ysd->dom_server_port = ysd->dom_server_addr.sin_port; - close(fd); + _libc_close(fd); goto gotit; } else { /* no lock on binding file, YP is dead. */ /* Try to bring it back to life. */ - close(fd); + _libc_close(fd); goto skipit; } } @@ -480,7 +480,7 @@ skipit: if (ypbr.ypbind_status != YPBIND_SUCC_VAL) { clnt_destroy(client); ysd->dom_vers = -1; - sleep(_yplib_timeout/2); + _libc_sleep(_yplib_timeout/2); goto again; } } @@ -518,7 +518,7 @@ gotit: ysd->dom_vers = -1; goto again; } - if( fcntl(ysd->dom_socket, F_SETFD, 1) == -1) + if(_libc_fcntl(ysd->dom_socket, F_SETFD, 1) == -1) perror("fcntl: F_SETFD"); /* * We want a port number associated with this socket @@ -567,7 +567,7 @@ _yp_unbind(ypb) save = dup(ypb->dom_socket); clnt_destroy(ypb->dom_client); sock = dup2(save, sock); - close(save); + _libc_close(save); } else clnt_destroy(ypb->dom_client); } |
