Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Process::Status#exit_status #8647

Merged
merged 7 commits into from
Dec 25, 2024
10 changes: 7 additions & 3 deletions src/process/status.cr
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# The status of a terminated process.
class Process::Status
# Platform-specific exit status code, which usually contains either the exit code or a termination signal.
# The other `Process::Status` methods extract the values from `exit_status`.
getter exit_status : Int32

def initialize(@exit_status : Int32)
end
Expand All @@ -25,6 +22,13 @@ class Process::Status
Signal.from_value(signal_code)
end

# Platform-specific exit status code, which usually contains either the exit code or a termination signal.
# The other `Process::Status` methods extract the values from `exit_status`.
@[Deprecated("Use `Process::Status#exit_code`")]
jwoertink marked this conversation as resolved.
Show resolved Hide resolved
def exit_status
@exit_status
end

# If `normal_exit?` is `true`, returns the exit code of the process.
def exit_code
# define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
Expand Down