hot_restart1

command
v0.0.0-...-156932d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

热重启测试1

进程启动起来后,给它发信号SIGUSR1、SIGUSR2触发进程FORK逻辑,主进程会把listenfd传递给子进程, 因为同时传递了fd 0、1、2,所以在子进程中fd 3就是接收到的listenfd,通过它重建listener即可。

是不是热重启模式,通过一个自定义环境变量来指明,在fork前设置好环境变量,子进程启动时先检查它。

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL