Fixes T5855. Adds a --graceful N flag to phd stop and phd restart.
phd will send SIGINT, wait N seconds, SIGTERM, wait 15 seconds, and SIGKILL. By default, N is 15.
Differential D10228
Send graceful shutdown signals to daemons in Phabricator epriestley on Aug 12 2014, 2:34 AM. Authored by Tags None Referenced Files
Subscribers
Details
Fixes T5855. Adds a --graceful N flag to phd stop and phd restart. phd will send SIGINT, wait N seconds, SIGTERM, wait 15 seconds, and SIGKILL. By default, N is 15.
Diff Detail
Event TimelineComment Actions Tried this out with --graceful 120. Is it intended that in the taskmaster log you'll see: (2) Graceful shutdown in response to signal 2 (SIGINT). but bin/phd restart will still be waiting for the daemon to exit? It seems like the process should quit after this and show "Daemon 1234 exited." as they exit. In addition, the daemon showed a status of "Running" in the daemons app (the same one that reported the graceful shutdown). Comment Actions In addition, it was only after the daemon got: (15) Shutting down in response to signal 15 (SIGTERM). that it moved to the status of "Exiting" in the daemons app. Comment Actions Strangely enough, it has the expected behaviour when running a separate daemon as bin/phd debug, but not for any of the daemons started with bin/phd start or bin/phd restart. Comment Actions By that I mean when running bin/phd debug and then doing bin/phd restart in another tab. I'll try ^C now. |