Terminal Closure Causes Service Shutdown

Q:

Why does Workerman shut down by itself when I close the terminal?

A:

Workerman has two starting modes: debug mode and daemon mode.

Running php xxx.php start enters debug mode, which is used for developing and debugging issues; when the terminal closes, Workerman will shut down accordingly.

Running php xxx.php start -d enters daemon mode, where closing the terminal will not affect Workerman.

If you want Workerman to be unaffected by the terminal, you can start it in daemon mode.