> ## Documentation Index
> Fetch the complete documentation index at: https://site.aspect.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Exit status

`property` **ExitStatus.code**

<div class="code-block mt-5 mb-8 not-prose rounded-2xl relative group text-gray-950 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark bg-transparent dark:bg-transparent" numberoflines="10" language="python">
  <div class="w-0 min-w-full max-w-full py-3.5 px-4 h-full dark:bg-codeblock relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out [&_*]:ring-0 [&_*]:outline-none [&_*]:focus:ring-0 [&_*]:focus:outline-none [&_pre>code]:pr-[3rem] [&_pre>code>span.line-highlight]:min-w-[calc(100%+3rem)] [&_pre>code>span.line-diff]:min-w-[calc(100%+3rem)] rounded-2xl bg-white overflow-x-auto scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-black/15 hover:scrollbar-thumb-black/20 active:scrollbar-thumb-black/20 dark:scrollbar-thumb-white/20 dark:hover:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25" data-component-part="code-block-root" tabindex="0">
    <div class="font-mono whitespace-pre leading-6">
      <pre class="shiki shiki-themes github-light-default dark-plus" language="python">
        <code language="python">
          <span class="source python"><span class="meta qualified-name python"><span class="meta generic-name python">ExitStatus</span><span class="punctuation accessor dot python">.</span><span class="meta generic-name python">code</span></span><span class="punctuation separator annotation variable python">:</span> <a href="/axl/types">None</a> <span class="keyword operator arithmetic python">|</span> <a href="/axl/types/int">int</a></span>
        </code>
      </pre>
    </div>
  </div>
</div>

Returns the exit code of the process, if any.

In Unix terms the return value is the **exit status**: the value passed to `exit`, if the
process finished by calling `exit`.  Note that on Unix the exit status is truncated to 8
bits, and that values that didn't come from a program's call to `exit` may be invented by the
runtime system (often, for example, 255, 254, 127 or 126).

On Unix, this will return `None` if the process was terminated by a signal.

`property` **ExitStatus.signal**

<div class="code-block mt-5 mb-8 not-prose rounded-2xl relative group text-gray-950 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark bg-transparent dark:bg-transparent" numberoflines="10" language="python">
  <div class="w-0 min-w-full max-w-full py-3.5 px-4 h-full dark:bg-codeblock relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out [&_*]:ring-0 [&_*]:outline-none [&_*]:focus:ring-0 [&_*]:focus:outline-none [&_pre>code]:pr-[3rem] [&_pre>code>span.line-highlight]:min-w-[calc(100%+3rem)] [&_pre>code>span.line-diff]:min-w-[calc(100%+3rem)] rounded-2xl bg-white overflow-x-auto scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-black/15 hover:scrollbar-thumb-black/20 active:scrollbar-thumb-black/20 dark:scrollbar-thumb-white/20 dark:hover:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25" data-component-part="code-block-root" tabindex="0">
    <div class="font-mono whitespace-pre leading-6">
      <pre class="shiki shiki-themes github-light-default dark-plus" language="python">
        <code language="python">
          <span class="source python"><span class="meta qualified-name python"><span class="meta generic-name python">ExitStatus</span><span class="punctuation accessor dot python">.</span><span class="meta generic-name python">signal</span></span><span class="punctuation separator annotation variable python">:</span> <a href="/axl/types">None</a> <span class="keyword operator arithmetic python">|</span> <a href="/axl/types/int">int</a></span>
        </code>
      </pre>
    </div>
  </div>
</div>

If the process was terminated by a signal, returns that signal.

In other words, if `WIFSIGNALED`, this returns `WTERMSIG`.

Avability: UNIX

`property` **ExitStatus.stopped\_signal**

<div class="code-block mt-5 mb-8 not-prose rounded-2xl relative group text-gray-950 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark bg-transparent dark:bg-transparent" numberoflines="10" language="python">
  <div class="w-0 min-w-full max-w-full py-3.5 px-4 h-full dark:bg-codeblock relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out [&_*]:ring-0 [&_*]:outline-none [&_*]:focus:ring-0 [&_*]:focus:outline-none [&_pre>code]:pr-[3rem] [&_pre>code>span.line-highlight]:min-w-[calc(100%+3rem)] [&_pre>code>span.line-diff]:min-w-[calc(100%+3rem)] rounded-2xl bg-white overflow-x-auto scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-black/15 hover:scrollbar-thumb-black/20 active:scrollbar-thumb-black/20 dark:scrollbar-thumb-white/20 dark:hover:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25" data-component-part="code-block-root" tabindex="0">
    <div class="font-mono whitespace-pre leading-6">
      <pre class="shiki shiki-themes github-light-default dark-plus" language="python">
        <code language="python">
          <span class="source python"><span class="meta qualified-name python"><span class="meta generic-name python">ExitStatus</span><span class="punctuation accessor dot python">.</span><span class="meta generic-name python">stopped\_signal</span></span><span class="punctuation separator annotation variable python">:</span> <a href="/axl/types">None</a> <span class="keyword operator arithmetic python">|</span> <a href="/axl/types/int">int</a></span>
        </code>
      </pre>
    </div>
  </div>
</div>

If the process was stopped by a signal, returns that signal.

In other words, if `WIFSTOPPED`, this returns `WSTOPSIG`.  This is only possible if the status came from
a `wait` system call which was passed `WUNTRACED`, and was then converted into an `ExitStatus`.

Avability: UNIX

`property` **ExitStatus.success**

<div class="code-block mt-5 mb-8 not-prose rounded-2xl relative group text-gray-950 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark bg-transparent dark:bg-transparent" numberoflines="10" language="python">
  <div class="w-0 min-w-full max-w-full py-3.5 px-4 h-full dark:bg-codeblock relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out [&_*]:ring-0 [&_*]:outline-none [&_*]:focus:ring-0 [&_*]:focus:outline-none [&_pre>code]:pr-[3rem] [&_pre>code>span.line-highlight]:min-w-[calc(100%+3rem)] [&_pre>code>span.line-diff]:min-w-[calc(100%+3rem)] rounded-2xl bg-white overflow-x-auto scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-black/15 hover:scrollbar-thumb-black/20 active:scrollbar-thumb-black/20 dark:scrollbar-thumb-white/20 dark:hover:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25" data-component-part="code-block-root" tabindex="0">
    <div class="font-mono whitespace-pre leading-6">
      <pre class="shiki shiki-themes github-light-default dark-plus" language="python">
        <code language="python">
          <span class="source python"><span class="meta qualified-name python"><span class="meta generic-name python">ExitStatus</span><span class="punctuation accessor dot python">.</span><span class="meta generic-name python">success</span></span><span class="punctuation separator annotation variable python">:</span> <a href="/axl/types/bool">bool</a></span>
        </code>
      </pre>
    </div>
  </div>
</div>

Was termination successful? Signal termination is not considered a success, and success is defined as a zero exit status.
