Skip to content

Add Signal Handling, Cacti process registration, and php-cs-fixer#71

Merged
TheWitness merged 7 commits intomainfrom
poller_csfixer
Feb 4, 2026
Merged

Add Signal Handling, Cacti process registration, and php-cs-fixer#71
TheWitness merged 7 commits intomainfrom
poller_csfixer

Conversation

@TheWitness
Copy link
Member

@TheWitness TheWitness commented Feb 4, 2026

This pull request does the following:

  • Marks the files poller_servcheck.php and servcheck_process.php executable and adds shebang
  • Add signal handling to both files to properly shut down each other when signaled
  • Implement the standard Cacti process control with timeouts. Calculate the timeouts as algorithmically defined in the design.
  • Apply Cacti 1.3+ PSR rules to the code for formatting
  • Move some code into functions
  • Improve debug statistics by adding memory and cpu usage.

Copy link
Contributor

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 implements signal handling, Cacti process registration with algorithmic timeouts, and applies PSR formatting standards to the servcheck plugin code.

Changes:

  • Adds signal handlers (SIGTERM, SIGINT, SIGUSR1) to gracefully shut down child processes
  • Implements Cacti process control with calculated timeouts based on test parameters
  • Adds shebang lines to poller_servcheck.php and servcheck_process.php
  • Converts array syntax from array() to [] (PSR-12 standard)
  • Removes obsolete plugin_servcheck_processes table
  • Adds configurable concurrent process count setting

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
poller_servcheck.php Adds signal handlers, process registration/management, and concurrent process control
servcheck_process.php Adds signal handlers, process registration with timeout calculation, and performance statistics
setup.php Removes obsolete processes table, adds concurrent processes setting, applies PSR formatting
servcheck_test.php PSR formatting changes (array syntax, spacing, comments)
servcheck_*.php PSR formatting changes across multiple files
includes/test_*.php PSR formatting changes in test modules
includes/functions.php PSR formatting and minor improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

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

Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

browniebraun
browniebraun previously approved these changes Feb 4, 2026
@TheWitness TheWitness merged commit 69c3f60 into main Feb 4, 2026
3 checks passed
@TheWitness TheWitness deleted the poller_csfixer branch February 4, 2026 12:10
Copy link
Contributor

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

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

AND poller_id = ? ' .
$sql_condition,
array($poller_id));
WHERE enabled = 'on',
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

SQL syntax error: There's a comma after 'WHERE enabled = "on"' when it should be removed or the SQL statement is incomplete. This will cause a database query error.

Copilot uses AI. Check for mistakes.
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.

3 participants