<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kiririmode</author_name>
  <author_url>https://blog.hatena.ne.jp/kiririmode/</author_url>
  <blog_title>理系学生日記</blog_title>
  <blog_url>https://kiririmode.hatenablog.jp/</blog_url>
  <categories>
    <anon>perl</anon>
  </categories>
  <description>AnyEvent::Util に run_cmd ってのがあるので、これを使うと良いのではないかと思う。 run_cmd は AnyEvent の Condition Variable ($cv) を返す。外部コマンドが実行を終えると、run_cmd 内部ではこの $cv に対して send が呼ばれる*1。外部コマンド実行後のタイミングで実行されるコールバックは $cv-&gt;cb で設定する。 my $cv = run_cmd [qw(sleep 5)]; print &quot;now sleeping ....\n&quot;; $cv-&gt;cb( sub { print &quot;wake up\n&quot;; } ); $…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkiririmode.hatenablog.jp%2Fentry%2F20090913%2Fp1&quot; title=&quot;AnyEvent で外部コマンドを実行するときの注意点 - 理系学生日記&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>2009-09-13 00:00:00</published>
  <title>AnyEvent で外部コマンドを実行するときの注意点</title>
  <type>rich</type>
  <url>https://kiririmode.hatenablog.jp/entry/20090913/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
