On 2015-12-24 23:49, Michael McConville wrote:
d.l...@openmailbox.org wrote:
hi, i think this is a bug/typo in the poll(2) example: FD_SET
becomes two arguments.
[demime 1.01d removed an attachment of type text/x-diff which had a
name of mypatch.diff]
Your attachment got stripped. It's easiest just to include it at the
bottom of your message.
sorry, hope it's now working.
===================================================================
RCS file: /cvs/src/lib/libc/sys/poll.2,v
retrieving revision 1.31
diff -u -p -r1.31 poll.2
--- poll.2 3 Mar 2015 01:13:41 -0000 1.31
+++ poll.2 24 Dec 2015 22:34:58 -0000
@@ -266,7 +266,7 @@ int nready;
timeout.tv_sec = 60;
timeout.tv_usec = 0;
FD_ZERO(&readfds);
-FD_SET(STDIN_FILENO);
+FD_SET(STDIN_FILENO, &readfds);
nready = select(STDIN_FILENO + 1, &readfds, NULL, NULL, &timeout);
if (nready == -1)
err(1, "select");