gitaly-wrapper: Prevent adoption of stale processes

The wrapper currently checks only the executable basename before adopting a process from the PID file. After a package upgrade, that can leave it supervising an old Gitaly or Praefect process even though a newer binary is installed. This adds executable file identity checks on Linux. If a live process doesn't match, the wrapper exits with a clear error for operator recovery. It also rechecks the PID file after inspection so it can follow a published replacement process. Failed rereads and repeated PID changes now return errors instead of spawning another process or adopting an outdated PID.

The commits start with a passing test showing the existing behavior, followed by executable validation and PID-file reconciliation.

Fixes : #7425

Merge request reports

Loading
Loading