<doc>
        <legacy_id>2212</legacy_id>
        <name>shutdownRequest</name>
        <type>message</type>

        <syntax>
                <example>shutdownRequest</example>
        </syntax>

        <synonyms>
        </synonyms>

        <summary>Sent to the <glossary tag="current stack">current card of the defaultStack </glossary>when the user tries to quit the <glossary tag="application">application</glossary>. </summary>

        <examples>
                <example>on shutdownRequest</p><p>  answer question &quot;Are you sure you want to quit?&quot; with &quot;Yes&quot; or &quot;No&quot;</p><p>  if it is &quot;Yes&quot; then pass shutdownRequest </p><p>end shutdownRequest</example>
        </examples>

        <history>
                <introduced version="1.0">Added.</introduced>
                <deprecated version=""></deprecated>
                <removed version=""></removed>
                <changed version="2.0"></changed>
        </history>

        <objects>
                <stack/>
        </objects>

        <platforms>
                <mac/>
                <windows/>
                <linux/>
          <ios/>
    <android/>
  </platforms>

        <classes>
                <desktop/>
                <server/>
                <web/>
          <mobile/>
  </classes>

        <security>
        </security>


        <classification>
                <category>Windows &amp; Dialog Boxes</category>
        </classification>

        <references>
                <command tag="quit">quit Command</command>
        </references>

        <description>
        <overview>Handle the <b>shutdownRequest</b> <keyword tag="message box">message</keyword> if you want to prevent the user from quitting the <glossary tag="application">application</glossary>.</overview>

        <parameters></parameters>

        <value></value>
        <comments>If the <b>shutdownRequest</b> <glossary tag="handler">handler</glossary> does not <control_st tag="pass">pass</control_st> the <keyword tag="message box">message</keyword> or send it to a further <glossary tag="object">object</glossary> in the <glossary tag="message path">message path</glossary>, the <glossary tag="application">application</glossary> does not exit. <glossary tag="pass">Passing</glossary> the <keyword tag="message box">message</keyword> allows the <glossary tag="application">application</glossary> to quit.<p></p><p>In standalones, some care is needed to ensure you receive the <b>shutdownRequest</b> message if your application uses multiple stacks. The most reliable approach is to install a library stack or backscript to handle the message when your application starts up.</p><p></p><p>On OS X and Unix systems, if the operating system sends a SIGTERM signal to the application, LiveCode sends a <b>shutdownRequest</b> <keyword tag="message box">message</keyword> to the <glossary tag="current stack">current stack</glossary>. <glossary tag="pass">Passing</glossary> the <keyword tag="message box">message</keyword> causes the application to quit normally. If the <keyword tag="message box">message</keyword> is <glossary tag="trap">trapped</glossary>, the signal is ignored. </p><p></p>
<p><note>Applications will not receive this message when running in the IDE.</note></p><p></p>
<p><b>Changes:</b></p><p>Handling of the SIGTERM signal was introduced in version 2.0. In previous versions, the SIGTERM signal did not cause a message to be sent.</p><p></p></comments>
        </description>
</doc>