<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shigemk2</author_name>
  <author_url>https://blog.hatena.ne.jp/shigemk2/</author_url>
  <blog_title>by shigemk2</blog_title>
  <blog_url>https://www.shigemk2.com/</blog_url>
  <categories>
    <anon>読書ノート</anon>
  </categories>
  <description>ProcessProcess.wait2も、終了した子プロセスのpidを返す。ただし、 wait2 は、その戻り値が pid と $? の配列であ る点だけが異なります。 # -*- coding: utf-8 -*- # 子プロセスを5つ生成する 5.times do fork do # 子プロセスごとにランダムな値を生成する # もし偶数なら 111 を、奇数なら 112 を終了コードとして返す if rand(5).even? exit 111 else exit 112 end end end 5.times do # 生成した子プロセスが終了するのを待つ pid, status = …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2F20130502%2F1367424881&quot; title=&quot;Process.wait2 - by shigemk2&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://tatsu-zine.com/images/books/87/cover_s.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-05-02 01:14:41</published>
  <title>Process.wait2</title>
  <type>rich</type>
  <url>https://www.shigemk2.com/entry/20130502/1367424881</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
