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

Introduce supervisor.procHandle interface #5137

Merged
merged 8 commits into from
Oct 23, 2024

Commits on Oct 22, 2024

  1. Refactor command line parsing into its own func

    Signed-off-by: Tom Wieczorek <[email protected]>
    twz123 committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    4d3dfdf View commit details
    Browse the repository at this point in the history
  2. Refactor process environment parsing into its own func

    Signed-off-by: Tom Wieczorek <[email protected]>
    twz123 committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    36c37d7 View commit details
    Browse the repository at this point in the history
  3. Introduce unixPID type

    Add the cmdline and environ functions to it.
    
    Signed-off-by: Tom Wieczorek <[email protected]>
    twz123 committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    19a22f4 View commit details
    Browse the repository at this point in the history
  4. Add termination methods to unixPID

    This encapsulates the kill syscall.
    
    Signed-off-by: Tom Wieczorek <[email protected]>
    twz123 committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    22f2170 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2024

  1. Introduce procHandle interface

    This encapsulates all of the OS-specific code for interacting with
    processes identified by PID files.
    
    Signed-off-by: Tom Wieczorek <[email protected]>
    twz123 committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    a71d6ae View commit details
    Browse the repository at this point in the history
  2. Add newProcHandle function

    This will be the new factory function for OS-specific process
    interaction.
    
    Signed-off-by: Tom Wieczorek <[email protected]>
    twz123 committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    5abf54d View commit details
    Browse the repository at this point in the history
  3. Relocate OS-agnostic Supervisor methods

    Move the now OS-agnostic Supervisor methods maybeKillPidFile,
    shouldKillProcess and killPid from the UNIX-specific file into the
    general one.
    
    Signed-off-by: Tom Wieczorek <[email protected]>
    twz123 committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    de6909c View commit details
    Browse the repository at this point in the history
  4. Rename OS-specific files from Supervisor to procHandle

    The supervisor code is now completely OS independent. It uses the
    procHandle interface to abstract away any OS specifics. Rename the
    old OS-specific supervisor files to prochandle, since that's what they
    contain now.
    
    Signed-off-by: Tom Wieczorek <[email protected]>
    twz123 committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    ceaa0f9 View commit details
    Browse the repository at this point in the history