Should handle SIGINT and SIGTERM signals
Bedrock server should handle signals like SIGTERM and SIGINT for Linux like Java edition does. One of the benefits of doing that is that we can set bedrock server as a system service and it'll stop gracefully whenever the admin wants to stop the service or the system is shutting down.
Currently when it receives any of these signals it closes the server instantly without having the opportunity of cleaning up the server and it may lead to world corruption or worse.
Linked Issues
Comments3
History2
Resolution: Unresolved → Invalid
Added duplicates link: BDS-203BDS not stopping gracefully when running as a serviceIncomplete
+1 on this. I believe SIGINT is already handled (Ctrl-C in terminal will log the "Quit correctly" message); however, SIGTERM is definitely NOT handled, and this makes dockerizing more difficult as well.
In the meantime, you can wrap the server in a shell script to handle SIGTERM and shutdown the server gracefully by issuing a "stop" command. It ain't pretty, but it works...
Here's the dash script I use. (do not run with bash!)
Could a mod please link to
BDS-203and close this issue.