{"type":"rich","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatsuoishimoto.hatenablog.com%2Fentry%2F20110401%2F1301629240\" title=\"Python\u3067\u5b66\u3076\u300c\u8a73\u89e3 UNIX\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d(\u305d\u306e14) \u7b2c14\u7ae0 \u30d7\u30ed\u30bb\u30b9\u9593\u901a\u4fe1 - atsuoishimoto&#39;s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","blog_url":"https://atsuoishimoto.hatenablog.com/","published":"2011-04-01 12:40:40","height":"190","author_name":"atsuoishimoto","categories":["Python","APUE"],"url":"https://atsuoishimoto.hatenablog.com/entry/20110401/1301629240","description":"14.1 \u30d1\u30a4\u30d7\u3092\u4ecb\u3057\u3066\u89aa\u304b\u3089\u5b50\u3078\u30c7\u30fc\u30bf\u3092\u8ee2\u9001\u3059\u308b import sys, os r, w = os.pipe() pid = os.fork() if pid: # parent os.close(r) os.write(w, \"hello world\\n\") else: # child os.close(w) line = os.read(r, 80) print line 14.2 \u30da\u30fc\u30b8\u8868\u793a\u30d7\u30ed\u30b0\u30e9\u30e0\u3078\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b import sys, os if len(sys.argv) != 2: sys.exit(\"usage: 14.2.py <pathname>\") fp = o\u2026","width":"100%","title":"Python\u3067\u5b66\u3076\u300c\u8a73\u89e3 UNIX\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d(\u305d\u306e14) \u7b2c14\u7ae0 \u30d7\u30ed\u30bb\u30b9\u9593\u901a\u4fe1","version":"1.0","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/atsuoishimoto/","blog_title":"atsuoishimoto's diary"}