You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds two new boolean service configuration options:
- exit-on-stdout-eof: exit when the socket service shuts down its
output stream for writing.
- exit-on-stdin-eof: exit when the client sends EOF.
To avoid compatibility problems, global variables are used to pass this
information from the configuration parser to the I/O code. In the
future, there should be a better way to pass this information, but this
is not possible without more extensive changes. Fortunately, the
configuration parser only runs once in the life of any process right
now, so this commit adds assertions to check this. Qubes OS ships with
assertions enabled, so any violation of this rule will be detected.
The main use of these features is to emulate the old qubes.ConnectTCP
and qubes.UpdatesProxy services, which already had this behavior due to
the use of socat.
These features are only supported for socket-based services, as
executable services are more complicated and do not have a use case
right now.
Currently, if a service exits due to exit-on-stdin-eof, the empty
MSG_DATA_STDOUT that indicates EOF is not sent. This is not a problem
because qrexec-client-vm interprets MSG_DATA_EXIT_CODE as also
indicating EOF on stdout and stderr.
Fixes: QubesOS/qubes-issues#9176
0 commit comments