<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sat Jan 11 07:14:07 UTC 2025

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Mojang Studios Jira</title>
    <link>https://bugs.mojang.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en</language>    <build-info>
        <version>9.12.2</version>
        <build-number>9120002</build-number>
        <build-date>10-01-2024</build-date>
    </build-info>


<item>
            <title>[BDS-437] Should handle SIGINT and SIGTERM signals</title>
                <link>https://bugs.mojang.com/browse/BDS-437</link>
                <project id="11700" key="BDS">Bedrock Dedicated Server</project>
                    <description>&lt;p&gt;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&apos;ll stop gracefully whenever the admin wants to stop the service or the system is shutting down.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;</description>
                <environment></environment>
        <key id="225656">BDS-437</key>
            <summary>Should handle SIGINT and SIGTERM signals</summary>
                <type id="1" iconUrl="https://bugs.mojang.com/secure/viewavatar?size=xsmall&amp;avatarId=18903&amp;avatarType=issuetype">Bug</type>
                                    <status id="5" iconUrl="https://bugs.mojang.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="7">Invalid</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="nikalon">Miguel</reporter>
                        <labels>
                    </labels>
                <created>Sun, 27 Jan 2019 20:48:06 +0100</created>
                <updated>Sun, 9 Aug 2020 14:38:51 +0200</updated>
                            <resolved>Mon, 10 Feb 2020 11:56:11 +0100</resolved>
                                    <version>1.8.1.2</version>
                                                            <votes>1</votes>
                                    <watches>1</watches>
                                                                            <comments>
                            <comment id="631837" author="ionicecko" created="Mon, 10 Feb 2020 07:04:03 +0100"  >&lt;p&gt;Could a mod please link to &lt;a href=&quot;https://bugs.mojang.com/browse/BDS-203&quot; title=&quot;BDS not stopping gracefully when running as a service&quot; class=&quot;issue-link&quot; data-issue-key=&quot;BDS-203&quot;&gt;&lt;del&gt;BDS-203&lt;/del&gt;&lt;/a&gt; and close this issue.&lt;/p&gt;</comment>
                            <comment id="515609" author="tofulisk" created="Wed, 30 Jan 2019 06:26:16 +0100"  >&lt;p&gt;In the meantime, you can wrap the server in a shell script to handle SIGTERM and shutdown the server gracefully by issuing a &quot;stop&quot; command.&#160; It ain&apos;t pretty, but it works...&lt;/p&gt;

&lt;p&gt;Here&apos;s the &lt;b&gt;dash&lt;/b&gt; script I use.&#160; &lt;em&gt;(do not run with bash!)&lt;/em&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;set -e
pipe=/run/minecraft/pipe.$$

mkfifo $pipe
exec 3&amp;lt;&amp;gt; $pipe
rm $pipe

&amp;lt;&amp;amp;3 3&amp;gt;&amp;amp;- LD_LIBRARY_PATH=. ./bedrock_server &amp;amp; pid=$!
exec &amp;gt;&amp;amp;3 3&amp;lt;&amp;amp;-

trap &lt;span class=&quot;code-quote&quot;&gt;&apos;echo stop&apos;&lt;/span&gt; INT TERM
trap : CHLD

&lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; read -r line; &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; echo $line; done
wait $pid
exit $?
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="515608" author="tofulisk" created="Wed, 30 Jan 2019 06:08:25 +0100"  >&lt;p&gt;+1 on this.&#160; I believe SIGINT is already handled (Ctrl-C in terminal will log the &quot;Quit correctly&quot; message); however, SIGTERM is definitely NOT handled, and this makes dockerizing more difficult as well.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10102">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="217255">BDS-203</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                    <customfield id="customfield_11700" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0wzof:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>