<div dir="ltr">2014-07-15 17:32 GMT+02:00 Thiago Macieira <span dir="ltr"><<a href="mailto:thiago@kde.org" target="_blank">thiago@kde.org</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="">On Tuesday 15 July 2014 11:51:40 Stefanos A. wrote:<br>
> while (!exit) {<br>
> int ret = poll(&pfd, 1, -1);<br>
> if (ret < 0) {<br>
> // ret is always -1<br>
> exit = ret;<br>
> }<br>
> else {<br>
> // never gets here<br>
> libinput_dispatch(input_context);<br>
> }<br>
> }<br>
><br>
> If I remove 'poll' then I can retrieve input events without any trouble.<br>
><br>
> Is what I am trying to do supported? If so, what could be the problem? Or,<br>
> if not, then is there a supported way to block on libinput events?<br>
<br>
</div>What errno are you getting?<span class=""><font color="#888888"><br></font></span></blockquote><div><br><div>The original code is not written in C, so I mistakenly assumed I couldn't
access errno. I checked the documentation and it appears I was wrong -
so I added the necessary code to retrieve errno and... poll() no longer returns an error.<br><br></div><div>It may be that I have changed
something in the meantime that resolves the issue, whatever that was,
although I cannot find anything relevant in the git log. Oh well, the
libinput driver is working correctly now. If something comes up, and I
can conclusively verify its not my code, I'll follow up in bugzilla.<br></div><div><br></div>Cheers! <br></div></div><br></div></div>