<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hecomi</author_name>
  <author_url>https://blog.hatena.ne.jp/hecomi/</author_url>
  <blog_title>凹みTips</blog_title>
  <blog_url>https://tips.hecomi.com/</blog_url>
  <categories>
    <anon>C++</anon>
    <anon>node.js</anon>
  </categories>
  <description>はじめに タイトル通り node.js の exec 関数の同期版を作ってみたというお話です。 問題点 node.js の child_process から使える exec 関数は非同期に行われるので、例えば A という処理をコンソール上で行なって成否判定をしてから、 B を行いたい、といった時にはネストするしかありません。A と B の処理がそれぞれ別の関数から exec されたものだとするとお手上げ状態になってしまいます。簡単なコードを示すと以下のようになります。 var exec = require('child_process').exec; function ls() { exec(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftips.hecomi.com%2Fentry%2F20120708%2F1341742546&quot; title=&quot; node.js の exec の同期版を作ってみた - 凹みTips&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>2012-07-08 19:15:46</published>
  <title> node.js の exec の同期版を作ってみた</title>
  <type>rich</type>
  <url>https://tips.hecomi.com/entry/20120708/1341742546</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
