{"id":1047,"date":"2016-08-03T21:03:10","date_gmt":"2016-08-03T12:03:10","guid":{"rendered":"http:\/\/www.chihayafuru.jp\/tech\/?p=1047"},"modified":"2017-02-13T14:22:42","modified_gmt":"2017-02-13T05:22:42","slug":"sigpipe%e3%82%b7%e3%82%b0%e3%83%8a%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/1047","title":{"rendered":"SIGPIPE\u30b7\u30b0\u30ca\u30eb"},"content":{"rendered":"<p>\u30af\u30ed\u30fc\u30ba\u3055\u308c\u305fPIPE(\u542b\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30bd\u30b1\u30c3\u30c8)\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u30a2\u30af\u30bb\u30b9\u3057\u305f\u30d7\u30ed\u30bb\u30b9\uff08\u30a2\u30d7\u30ea\uff09\u306b\u5bfe\u3057\u3066\u3001SIGPIPE\u30b7\u30b0\u30ca\u30eb\u304c\u901a\u77e5\u3055\u308c\u308b\u3002<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fSIGPIPE\u30b7\u30b0\u30ca\u30eb\u3092\u53d7\u4fe1\u3057\u305f\u30d7\u30ed\u30bb\u30b9\u306f\u5f37\u5236\u7d42\u4e86\u3055\u308c\u308b\u3002<\/p>\n<p>\u5f37\u5236\u7d42\u4e86\u3092\u56de\u907f\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3044\u305a\u308c\u304b\u306e\u5bfe\u7b56\u3092\u53d6\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<ol>\n<li>SIGPIPE\u30b7\u30b0\u30ca\u30eb\u3092\u7121\u8996\u3059\u308b\u8a2d\u5b9a\u3092\u4e0e\u3048\u308b\n<ol>\n<li>\u5168\u9762\u7684\u306b\u7121\u8996\u3059\u308b\n<pre class=\"lang:c decode:true \" >signal(SIGPIPE, SIG_IGN);<\/pre>\n<\/li>\n<li>\u30bd\u30b1\u30c3\u30c8\u500b\u5225\u306b\u7121\u8996\u3059\u308b\u3002\n<pre class=\"lang:c decode:true \" >int value = 1;\r\nsetsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, &amp;value, sizeof(value));<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<li>SIGPIPE\u30b7\u30b0\u30ca\u30eb\u3092\u30cf\u30f3\u30c9\u30e9\u3067\u51e6\u7406\u3059\u308b<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4>\u53c2\u8003<\/h4>\n<p><a href=\"https:\/\/developer.apple.com\/jp\/documentation\/NetworkingInternetWeb\/Conceptual\/NetworkingOverview\/CommonPitfalls\/CommonPitfalls.html\"><br \/>\niOS Developer Library &#8211; \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u51e6\u7406\u306b\u304a\u3044\u3066\u72af\u3057\u304c\u3061\u306a\u8aa4\u308a\u306e\u56de\u907f<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30af\u30ed\u30fc\u30ba\u3055\u308c\u305fPIPE(\u542b\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30bd\u30b1\u30c3\u30c8)\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u30a2\u30af\u30bb\u30b9\u3057\u305f\u30d7\u30ed\u30bb\u30b9\uff08\u30a2\u30d7\u30ea\uff09\u306b\u5bfe\u3057\u3066\u3001SIGPIPE\u30b7\u30b0\u30ca\u30eb\u304c\u901a\u77e5\u3055\u308c\u308b\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fSIGPIPE\u30b7\u30b0\u30ca\u30eb\u3092\u53d7\u4fe1\u3057\u305f\u30d7\u30ed\u30bb\u30b9\u306f\u5f37\u5236\u7d42\u4e86\u3055\u308c\u308b\u3002  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6],"class_list":["post-1047","post","type-post","status-publish","format-standard","hentry","category-memo","tag-unix"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=1047"}],"version-history":[{"count":9,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1047\/revisions"}],"predecessor-version":[{"id":1052,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1047\/revisions\/1052"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=1047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=1047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=1047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}