Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passt socket set via krun_set_passt_fd is never closed #185

Closed
teohhanhui opened this issue May 9, 2024 · 2 comments
Closed

passt socket set via krun_set_passt_fd is never closed #185

teohhanhui opened this issue May 9, 2024 · 2 comments

Comments

@teohhanhui
Copy link
Contributor

The nature of raw fd's means that we should assume ownership, and close it so that the passt process can exit.

The calling program e.g. chroot_vm cannot do this, as once krun_start_enter is called, control never returns to the caller.

@teohhanhui
Copy link
Contributor Author

teohhanhui commented May 9, 2024

From man passt:

   -F, --fd FD
          Pass a pre-opened, connected socket to passt. Usually the socket is opened in the parent
          process and passt inherits it when run as a child. This allows the parent process to open
          sockets using another address family or requiring special privileges.

          This option implies the behaviour described for --one-off, once this socket is closed.

   -1, --one-off
          Quit after handling a single client connection, that is, once the client closes the socket,
          or once we get a socket error.

@teohhanhui
Copy link
Contributor Author

Sorry. I was mistaken. This has been explained to me in https://github.com/slp/krun/pull/1#discussion_r1596761479 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant