Skip to content

pv-runtime: Initialize all file descriptor members

Simon McVittie requested to merge wip/smcv/init-all-fds into main
  • pv-runtime: Initialize all file descriptor members to -1

    If we don't do this, if initable_init fails before we have set them, we'll crash with an assertion failure when we try to close them in finalize.

  • pv-runtime: Sort list of file descriptor members alphabetically

    This makes it easier to check that they are all initialized.

  • pv-runtime: Sort members alphabetically in finalize

    This minimizes conflicts by ensuring that there's only one correct place to add them, and makes it easier to see that all the fds were closed.

Merge request reports