Skip to content

Model waitable events above raw file descriptors #56

Description

@isomorphisms

Preserve this as a semantic-OS / IB design canary.

A historical curses/PDCurses discussion exposed a case where a program wanted to wait for terminal keyboard input and a command pipe at the same time, but the programmer could not find the object/descripter representing curses input. On one PDCurses backend an explicit PDC_get_input_fd() hook existed for select(); on other platforms terminal/input readiness is not necessarily represented by an ordinary POSIX file descriptor.

That is useful regardless of whether the historical programmer simply missed documentation. It tells us that a semantic operating-system layer should make these facts obvious:

  • what kinds of things are waitable;
  • how a program obtains the waitable representation of an input/event source;
  • which waitables can be combined in one wait operation;
  • whether the representation is a Unix fd, platform handle, event object, message queue, or something else;
  • how portable code expresses the intent without knowing backend accidents.

For IB, this matters if the browser/knowledge environment grows toward the semantic operating-system layer: terminal input, pipes, subprocesses, filesystem events, sockets, UI events, timers, and later semantic/index events should have an explicit readiness/event model rather than requiring callers to guess which integer descriptor is hidden underneath.

This is not a claim that select() is broken. Track the discoverability + portability + abstraction issue.

Cross-links:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions