Overview
| Artifact ID: | c5405fa6694a0ff41108d41037ffd70470a5cdeb3cd8c99d86ac2c3c083783c9 |
|---|---|
| Ticket: | c6897e6e6a8a65a995ec35c9c297b926bf1b6783
select notifier crashes/misbehaves on fd >= FD_SETSIZE |
| User & Date: | sebres on 2019-11-11 16:28:38 |
Changes
- icomment:
@chw: as for your PoC (androwish implementation), I don't think panic is that what is expected if it reached NOFILES/FD_SETSIZE limits - it is possible to handle issues like this without immediate hard exit from a program (what panic basically does). As already said, current implementation of branch bug-c6897e6e6a is enough to handle <code>fd >= FD_SETSIZE</code> situation properly (generates an error as long as some fds get free later), exactly the same manner as in case of NOFILES limit is reached (so in <code>EMFILE</code> state), and in both cases regardless odd or even fds produced in listener/acceptor or on simple connector side.<br/> And if we get async-handling/notifier for <code>fd >= FD_SETSIZE</code> implementing properly (e. g. as suggested with poll/epoll or some other workaround), it'd be enough to delete the code-blocks actually enclosed in <code>ifdef CHECK_FD_SETSIZE_LIMIT</code> to fix it ultimately. In any case (unless it's not completelly fixed) I'd prefer the script/API generates an error - panic is simply too hard for such purposes.
- login: "sebres"
- mimetype: "text/x-fossil-wiki"