As reported by https://github.com/containers/podman/issues/21426 , it
may happen that during a Windows update the Event Log Service is
disabled automatically without the user noticing it. In this case win-sshproxy
fails at starting bc it is not able to write logs.
However, the Event Log Service could also be disabled voluntarely by the
user and we cannot be sure that the user want/can re-enable it. In such a case,
a warn log is printed and win-sshproxy keeps executing. It
should be up to the user to decide if to start the Event Log service again or keep
running win-sshproxy without logs.
Signed-off-by: lstocchi <lstocchi@redhat.com>
this commit fixes a potential race condition that prevented the tests to succeed
when running in a github workflow.
Basically the thread id was not actually available before
writing it on the file, resulting in a thread id equals to 0 written in it.
So, when the tests were trying to retrieve the thread id to use it to send
the WM_QUIT signal, they failed.
This patch adds a check on the thread id before writing
it on the file. Now, if the thread id is 0, it keeps calling winquit to
retrieve it. If, after 10 secs, there is no success it returns an error.
Signed-off-by: lstocchi <lstocchi@redhat.com>
This sets the version to `git describe --always --dirty` using the
`-X github.com/containers/gvisor-tap-vsock/pkg/types.ModuleVersion`
linker flag.
This adds a -version flag to all binaries which currently have
command-line flags.
Correct versioning when installing from tarballs, and through
`go install` will be addressed in the next commits.
This fixes https://github.com/containers/gvisor-tap-vsock/issues/295
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Leverages WM_CLOSE and WM_QUIT events on win32 for SIGTERM like behavior
The improved/updated logic is now implemented in a shared containers/winquit module
Also, refactors win-sshproxy.exe to be consistent (had it's own precursor impl)
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>