<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takuya_1st</author_name>
  <author_url>https://blog.hatena.ne.jp/takuya_1st/</author_url>
  <blog_title>それマグで！</blog_title>
  <blog_url>https://takuya-1st.hatenablog.jp/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>exec の引数について １つだけなら、問題ない。 Kernel.exec(&quot;ls&quot;) ２つになると・・・ Kernel.exec(&quot;ls -lt &quot;) ただし、これはシェル経由の呼び出し。 ３つになると・・・ Kernel.exec(&quot;ls -lt /&quot;) これもシェル経由の呼び出し シェル経由ってのは、sh に引数を与えて、呼び出している。 だから、実行中のプロセスを見ると sh が中間にいる。 シェル経由で呼び出しサンプル Kernel.exec(&quot;sleep 10 &quot;) 実行して、ps を見ると次のようになる。 0279 pts/0 Ss 0:00 \_ -bash #ruby を実行…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F2016%2F04%2F07%2F024517&quot; title=&quot; Kernel.exec の第２引数を使った、コマンド実行のサンプル - それマグで！&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>2016-04-07 02:45:17</published>
  <title> Kernel.exec の第２引数を使った、コマンド実行のサンプル</title>
  <type>rich</type>
  <url>https://takuya-1st.hatenablog.jp/entry/2016/04/07/024517</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
