Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e13c5a3eafb2bd51f209df8159c3ab04fc934ec9074134198a38aceca891ecc5
Ticket: c6897e6e6a8a65a995ec35c9c297b926bf1b6783
select notifier crashes/misbehaves on fd >= FD_SETSIZE
User & Date: sebres on 2019-11-07 11:51:04
Changes

  1. icomment:
    a) This is just PoC, not a fully correct solution (also note it still doesn't work for macOS/Xcode, see [https://travis-ci.org/tcltk/tcl/builds/608613091|travis-ci/608613091], EBADFD is undeclared there).
    
    b&c) Although I think fixing of known issue (also if it firstly looks like a workaround) is better as to blame on system restriction and even such simple stupid reject is better as a busy wait or even crash, but as already said better would be extend notifier with poll for FD >= FD_SETSIZE and then deactivate CHECK_FD_SETSIZE_LIMIT (see [c2d030bb31a977a4])...<br/>
    So if ultimately it'd work for sockets (for FD exceeding FD_SETSIZE), it'd basically work for every other descriptor (like files, whatever).
    
    <i>> Can we maybe synthesize errors for channels that exceed FD_SETSIZE at the point where the notifier actually gets them (and not add them to the fd_set at all)?</i>
    
    I guess the emphasis is on "at the point"?<br/>
    Well sure it is possible (somehow together with many other places where FD_SET/FD_CLR/FD_COPY/FD_whatever are called), just I'd like to fix it ultimately and not to improve the workaround.
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"