diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-03-28 21:48:32 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-03-28 21:48:32 +0000 |
commit | 859638397ed7775f5d12e72f35fdd084919c015e (patch) | |
tree | 9ad83ee5f2dc5aa3145523c5155a9e03a09bae22 /libexec/identd | |
parent | 16a86255d1e49c6bed99fcc9f9f573d0f79e2eb8 (diff) |
Don't make poll exit right away; if timeout is 0 use -1 for poll.
Diffstat (limited to 'libexec/identd')
-rw-r--r-- | libexec/identd/identd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libexec/identd/identd.c b/libexec/identd/identd.c index 5fe8c11f0e0..ebe6eaebb00 100644 --- a/libexec/identd/identd.c +++ b/libexec/identd/identd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: identd.c,v 1.15 2001/01/28 19:34:28 niklas Exp $ */ +/* $OpenBSD: identd.c,v 1.16 2001/03/28 21:48:31 fgsch Exp $ */ /* * This program is in the public domain and may be used freely by anyone @@ -344,7 +344,10 @@ main(argc, argv) pfd[0].fd = 0; pfd[0].events = POLLIN; - nfds = poll(pfd, 1, timeout * 1000); + if (timeout) + nfds = poll(pfd, 1, timeout * 1000); + else + nfds = poll(pfd, 1, -1); } while (nfds < 0 && errno == EINTR); /* |