* [12.x] Make the worker timed out exit code reachable
Backport of the 13.x change.
Worker::kill() sends an uncatchable SIGKILL immediately before its
exit($status), so the status never leaves the process: a parent waiting
on the worker sees a signal death, which carries no exit code at all.
The SIGKILL is deliberate -- it stops shutdown functions and destructors
running on a frozen, mid-timeout job -- so the status cannot simply be
returned. Worker::killUsing() registers a callback that runs before it,
letting a worker replace its process image via pcntl_exec instead:
execve has the same semantics (no shutdown functions, no destructors)
while still delivering a chosen status, and preserves the PID so the
parent's wait() returns normally.
This branch had no Worker::$timedOutExitCode, so that is added here too
and the timeout handler now honours it, matching 13.x.
Off by default and fails safe: with no callback registered, or if the
exec fails, execution falls through to the existing posix_kill.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Remove unnecessary line in QueueConnector.php
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>