the behavior when start_server receives multiple HUP signals
go-server-starter implements the different to Server::Starter's one.
p5-server-starter behavior:
old workers action
------- ------------ ----------------------------------------------------
1st HUP 0 spawn new worker and send TERM signal to old workers
2nd HUP 1 spawn new worker and send TERM signal to old workers
3rd HUP 2 spwan new worker and send TERM signal to old workers (stop one)
4th HUP 2 ...
go-server-starter behavior:
old workers action
------- ------------ ----------------------------------------------------
1st HUP 0 spawn new worker and send TERM signal to old workers
2nd HUP 1 no action
3nd HUP 1 no action (stop one old worker)
4th HUP 0 spawn new worker and send TERM signal to old workers
when the all old worker exit.
I want to use the original perl's behavior with go-server-starter.
I also notice that restart = 2 is not used for now. Should we implement other options and set restart = 2?
I can appreciate that there's a difference, but I'm having trouble deciphering what the table you show represent.
- What's the "old workers" represent here?
- Is this really a problem with the number of signals, or a timing issue?
- I read the original p5 code, and I can't see restart = 2 now, has it been deprecated?
"old workers" represents the number of remain workers which includes oldWorkers list. My interest is the number of signals sending to old workers and I want to send the signal to old workers when send HUP to start_server again.
I just found restart = 2 in go-server-starter (I don't know the old p5 code).
申し訳ないですが、日本語でどうぞ!↑の説明、多分文章の時制がはっきりしてないせいで、どのタイミングで何が起こるべきだと言われてるのか全くわからないです…
うまく伝わらなくてすいません。。
やりたいこととしては、HUPシグナルを再度送ったときに、workerがまだ死んでいなければ、再度死んでないworkerにTERMシグナルを送ることです。 p5の場合、HUPを送ると新しいプロセスの起動とTERMシグナルの送信を繰り返すので、これと同じ挙動であれば問題ありません(新しいプロセスが起動されるかどうかは問題にしていないので、起動されなくてもかまいません)。
なるほど、なるほど。わかりました! ちょっとこれから退席しなければいけないので次の返信は遅くなりますが、その間にコード見ておきます!
おまたせしました。 #11 の感じでどうでしょうかねぇ
@lestrrat すいません!いまみました、今日夜以降確認しますので、明日コメントさせて頂きます
@harukasan ping?