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

14.3 encoutered #71

Open
f-yoshihara opened this issue Dec 17, 2022 · 0 comments
Open

14.3 encoutered #71

f-yoshihara opened this issue Dec 17, 2022 · 0 comments

Comments

@f-yoshihara
Copy link

f-yoshihara commented Dec 17, 2022

encoutered -> encountered かなと思いました。

5.times do
  # 生成した子プロセスが終了するのを待つ。
  pid, status = Process.wait2

  # もし終了コードが 111 なら、
  # 子プロセス側で生成された値が偶数だとわかる。
  if status.exitstatus == 111
    puts "#{pid} encoutered an even number!"
  else
    puts "#{pid} encoutered an odd number!"
  end
end

v1.1.4 の EPUB 版で確認しました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant