<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bamch0h</author_name>
  <author_url>https://blog.hatena.ne.jp/bamch0h/</author_url>
  <blog_title>bamchoh’s diary</blog_title>
  <blog_url>https://bamch0h.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>親プロセスで作成したパイプを子プロセス間でつなぐ方法 以下のスクリプトは、標準入力で 何か文字を入力すると、それが出力されるサンプル。 out_r, out_w = IO.pipe script1 = &lt;&lt;~SCRIPT1 $stdout.sync = true loop do v = gets puts '1:' + v sleep 1 end SCRIPT1 spawn(&quot;ruby&quot;, &quot;-e&quot;, script1, { :out =&gt; out_w }) script2 = &lt;&lt;~SCRIPT2 loop do puts '2:' + gets sleep 1 end SCRIPT2 spa…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbamch0h.hatenablog.com%2Fentry%2F2021%2F09%2F12%2F113404&quot; title=&quot; 子プロセス間でパイプをつなぐ - bamchoh’s diary&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-09-12 11:34:04</published>
  <title> 子プロセス間でパイプをつなぐ</title>
  <type>rich</type>
  <url>https://bamch0h.hatenablog.com/entry/2021/09/12/113404</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
