Skip to content

refactor main function for better readability#32

Merged
damachine merged 1 commit intomainfrom
patch-2
Sep 14, 2025
Merged

refactor main function for better readability#32
damachine merged 1 commit intomainfrom
patch-2

Conversation

@damachine
Copy link
Owner

No description provided.

@damachine damachine requested a review from Copilot September 14, 2025 19:16
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cppcheck (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@damachine damachine merged commit 65220a6 into main Sep 14, 2025
11 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors the main function in src/main.c to improve readability and maintainability by breaking down large, monolithic functions into smaller, focused helper functions.

  • Extracts PID file validation, reading, and writing logic into separate functions
  • Splits signal handling into multiple focused functions for better organization
  • Breaks down daemon loop timing calculations into helper functions
  • Separates shutdown image handling into dedicated validation and sending functions

@damachine damachine deleted the patch-2 branch September 14, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants