# Trait std::os::unix::process::ExitStatusExt 1.0.0[−][src]

    pub trait ExitStatusExt: Sealed {
        fn from_raw(raw: i32) -> Self;
        fn signal(&self) -> Option<i32>;
        fn core_dumped(&self) -> bool;
        fn stopped_signal(&self) -> Option<i32>;
        fn continued(&self) -> bool;
        fn into_raw(self) -> i32;
    }

This is supported on Unix only.

Unix-specific extensions to `process::ExitStatus`.

This trait is sealed: it cannot be implemented outside the standard library. This is so that future additional methods are not breaking changes.

## Required methods

### `fn from_raw(raw: i32) -> Self` 1.12.0[src]

Creates a new `ExitStatus` from the raw underlying `i32` return value of a process.

### `fn signal(&self) -> Option<i32>`[src]

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

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

### `fn core_dumped(&self) -> bool`[src]

🔬 This is a nightly-only experimental API. (`unix_process_wait_more` #80695)

If the process was terminated by a signal, says whether it dumped core.

### `fn stopped_signal(&self) -> Option<i32>`[src]

🔬 This is a nightly-only experimental API. (`unix_process_wait_more` #80695)

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`, was then converted into an `ExitStatus`.

### `fn continued(&self) -> bool`[src]

🔬 This is a nightly-only experimental API. (`unix_process_wait_more` #80695)

Whether the process was continued from a stopped status.

Ie, `WIFCONTINUED`. This is only possible if the status came from a `wait` system call which was passed `WCONTINUED`, was then converted into an `ExitStatus`.

### `fn into_raw(self) -> i32`[src]

🔬 This is a nightly-only experimental API. (`unix_process_wait_more` #80695)

Returns the underlying raw `wait` status.

Loading content...

## Implementors

### `impl ExitStatusExt for ExitStatus`[src]

#### `fn from_raw(raw: i32) -> Self`[src]

#### `fn signal(&self) -> Option<i32>`[src]

#### `fn core_dumped(&self) -> bool`[src]

🔬 This is a nightly-only experimental API. (`unix_process_wait_more` #80695)

#### `fn stopped_signal(&self) -> Option<i32>`[src]

🔬 This is a nightly-only experimental API. (`unix_process_wait_more` #80695)

#### `fn continued(&self) -> bool`[src]

🔬 This is a nightly-only experimental API. (`unix_process_wait_more` #80695)

#### `fn into_raw(self) -> i32`[src]

🔬 This is a nightly-only experimental API. (`unix_process_wait_more` #80695)
Loading content...