PHPackages                             tourze/workerman-master-killer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tourze/workerman-master-killer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tourze/workerman-master-killer
==============================

Kill Workerman master process, inspired by https://www.workerman.net/q/7958

0.0.1(6mo ago)00MITPHPCI passing

Since Oct 31Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/tourze/workerman-master-killer)[ Packagist](https://packagist.org/packages/tourze/workerman-master-killer)[ RSS](/packages/tourze-workerman-master-killer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Workerman Master Killer
=======================

[](#workerman-master-killer)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/dd8ad24f6dacb3f18ed1dae8e84a409ef0537a5bf964421e45dc9f468aaf748e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f776f726b65726d616e2d6d61737465722d6b696c6c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/workerman-master-killer)[![PHP Version](https://camo.githubusercontent.com/902c5c73d15c47949149316d0b9c3a01a8876c7b7c82d6a505f22d95d2d769a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f776f726b65726d616e2d6d61737465722d6b696c6c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/workerman-master-killer)[![Total Downloads](https://camo.githubusercontent.com/bebc90f538c9368e821dcfd14ba35ba9f3dfb5daa47eca01045f62bfe2fda5df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f776f726b65726d616e2d6d61737465722d6b696c6c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/workerman-master-killer)[![License](https://camo.githubusercontent.com/7592b2b0e5b6685ad67025fd925e684e143bc2e848ec90e7c3016d6e93de39b3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f746f75727a652f776f726b65726d616e2d6d61737465722d6b696c6c65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/tourze/workerman-master-killer)

[![Build Status](https://camo.githubusercontent.com/2551ba4d56185c6846b03b3cbddf0dd03db1dfdc77866c81c142a8aa80ac6d9d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f776f726b65726d616e2d6d61737465722d6b696c6c65722f63692e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/tourze/workerman-master-killer/actions)[![Coverage Status](https://camo.githubusercontent.com/936120335af22570f341b1dee267cea83d6f548eeca05114e8c2022875c73cc0/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f776f726b65726d616e2d6d61737465722d6b696c6c65723f7374796c653d666c61742d737175617265)](https://codecov.io/gh/tourze/workerman-master-killer)

A utility to safely kill the Workerman master process. Inspired by [this Workerman forum post](https://www.workerman.net/q/7958).

Features
--------

[](#features)

- Safe termination of Workerman master process with timeout protection
- Comprehensive logging support with PSR-3 compatible logger
- Graceful shutdown using SIGQUIT signal
- Testable design with protected methods for mocking
- Compatible with Workerman 5.1+
- Useful for force-stopping master process when it cannot exit normally

Installation
------------

[](#installation)

```
composer require tourze/workerman-master-killer
```

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- ext-posix extension
- ext-pcntl extension
- Workerman 5.1 or higher
- PSR-3 compatible logger

Quick Start
-----------

[](#quick-start)

```
