diff --git a/src/process/status.cr b/src/process/status.cr index b24b59309301..c814ea991e80 100644 --- a/src/process/status.cr +++ b/src/process/status.cr @@ -228,9 +228,9 @@ class Process::Status # Process.new("sleep", ["10"]).tap(&.terminate).wait.exit_code? # => nil # ``` def exit_code? : Int32? - {% if flag?(:unix) %} - return unless normal_exit? + return unless normal_exit? + {% if flag?(:unix) %} # define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) (@exit_status & 0xff00) >> 8 {% else %}