Skip to content

bin: windows: restore ctrl c behavior on windows [backport 2.1]#7998

Merged
edsiper merged 2 commits into2.1from
cosmo0920-restore-ctrl-c-behavior-on-windows-2.1
Oct 2, 2023
Merged

bin: windows: restore ctrl c behavior on windows [backport 2.1]#7998
edsiper merged 2 commits into2.1from
cosmo0920-restore-ctrl-c-behavior-on-windows-2.1

Conversation

@cosmo0920
Copy link
Contributor

this is a backport of #7986


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

After supporting fleet management on Windows,
Ctrl-C events won't be caught up.
This commit re-enables for the behavior.
Windows' ctrl event handlers stolen signals which are overlapped ones.
So, we need to handle Ctrl-C events on the newly added event handler for Windows.

In Windows, SIGINT and SIGBREAK are valid ctrl events on their terminal.
This is why we only need to handle CTRL_C_EVENT and CTRL_BREAK_EVENT events on console handler.

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 11:00 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 11:00 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 11:00 — with GitHub Actions Inactive
@patrick-stephens patrick-stephens added the ok-package-test Run PR packaging tests label Oct 2, 2023
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 11:27 — with GitHub Actions Inactive
@edsiper edsiper merged commit ed3dbc4 into 2.1 Oct 2, 2023
@edsiper edsiper deleted the cosmo0920-restore-ctrl-c-behavior-on-windows-2.1 branch October 2, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-required ok-package-test Run PR packaging tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants