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

Enable mono runtime to handle SIGTERM like CoreCLR #82806 #82813

Closed
wants to merge 6 commits into from

Commits on Mar 1, 2023

  1. Provide fix for dotnet#81093 - "Mono does not emit ProcessExit event …

    …on SIGTERM"
    
    * src/mono/mono/mini/mini-posix.c
      - Add signal handler for SIGTERM
    
    * src/mono/mono/mini/mini-windows.c
      - Add signal handler for SIGTERM
    
    * src/mono/mono/mini/mini-runtime.c
      - Add mono_sigterm_signal_handler to process SIGTERM that will set a global variable
        to be monitored by the GC finalizer thread
    
    * src/mono/mono/mini/mini-runtime.h
      - Define prototype for mono_sigterm_signal_handler()
    
    * src/mono/mono/metadata/gc.c
      - Monitor for sigterm and kick off the shutdown process when encountered by calling mono_runtime_try_shutdown().
      - Exit with either the user set exitcode (System.Environment.ExitCode) or SIGTERM + 128.
    nealef committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    c07259e View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2023

  1. * src/libraries/System.Runtime/tests/System/ExitCodeTests.Unix.cs

      - Re-enable ExitCodeTests for mono
    nealef committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    9ac0c3b View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. * src/mono/mono/mini/mini-runtime.c

      - Set a default exit code before starting the SIGTERM processing
    nealef committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    98eeadf View commit details
    Browse the repository at this point in the history
  2. * src/mono/mono/mini/mini-runtime.c

      - Set a default exit code before setting the term_signaled variable that gets checked in gc
    nealef committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    38b5e87 View commit details
    Browse the repository at this point in the history
  3. * src/mono/mono/metadata/gc.c

      - Simplify use of exit code now that a default is being set
    nealef committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    3adb5d6 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. * src/mono/mono/metadata/gc.c

      - Rename term_signaled to match mono style
      - Remove volatile attribute
      - Move testing of shutdown until after the sem wait
    
    * src/mono/mono/mini/mini-runtime.c
      - Rename term_signaled to mono_term_signaled
    
    * src/mono/mono/mini/mini-windows.c
      - Use the correct signal for handler
    nealef committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    bd9326b View commit details
    Browse the repository at this point in the history