{"id":54,"date":"2013-12-14T14:22:30","date_gmt":"2013-12-14T14:22:30","guid":{"rendered":""},"modified":"2013-12-14T14:22:30","modified_gmt":"2013-12-14T14:22:30","slug":"","status":"publish","type":"post","link":"http:\/\/weizn.net\/?p=54","title":{"rendered":"Linux\u4e0b\u7684\u50f5\u5c38\u7ebf\u7a0b"},"content":{"rendered":"<div style=\"word-wrap:break-word;\" class=\"Blog_wz1\">\n<p>\n\t\t<span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>join\uff08\uff09\uff1a<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u4f7f\u4e00\u4e2a<b>\u7ebf\u7a0b<\/b>\u7b49\u5f85\u53e6\u4e00\u4e2a<b>\u7ebf\u7a0b<\/b>\u7ed3\u675f<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>self()\uff1a<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u83b7\u5f97\u81ea\u8eab\u7684<b>\u7ebf\u7a0b<\/b>\u53f7<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">pthread_create():\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7ebf\u7a0b<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">pthread_detach():\u8bbe\u7f6e\u7ebf\u7a0b\u4e3a\u53ef\u5206\u79bb\u72b6\u6001\uff0cpthread\u6709\u4e24\u79cd\u72b6\u6001joinable\u72b6\u6001\u548cunjoinable\u72b6\u6001<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>exit()\uff1a\u901a\u8fc7\u81ea\u8eab\u6765\u7ed3\u675f\u7ebf\u7a0b\uff0c\u5e76\u91ca\u653e\u8d44\u6e90<\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>cancel()\uff1a\u901a\u8fc7\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u91ca\u653e\u8d44\u6e90<\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t<br \/>\n<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\"><\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\"><span style=\"font-size:18px;\">\u521b\u5efa\u4e00\u4e2a\u7ebf\u7a0b\u9ed8\u8ba4\u7684\u72b6\u6001\u662fjoinable,<br \/>\n\u5982\u679c\u4e00\u4e2a\u7ebf\u7a0b\u7ed3\u675f\u8fd0\u884c\u4f46\u6ca1\u6709\u88abjoin,\u5219\u5b83\u7684\u72b6\u6001\u7c7b\u4f3c\u4e8e\u8fdb\u7a0b\u4e2d\u7684Zombie<br \/>\nProcess,\u5373\u8fd8\u6709\u4e00\u90e8\u5206\u8d44\u6e90\u6ca1\u6709\u88ab\u56de\u6536\uff08\u9000\u51fa\u72b6\u6001\u7801\uff09\uff0c\u6240\u4ee5\u521b\u5efa\u7ebf\u7a0b\u8005\u5e94\u8be5\u8c03\u7528pthread_join\u6765\u7b49\u5f85\u7ebf\u7a0b\u8fd0\u884c\u7ed3\u675f\uff0c\u5e76\u53ef\u5f97\u5230\u7ebf\u7a0b\u7684\u9000\u51fa\u4ee3<br \/>\n\u7801\uff0c\u56de\u6536\u5176\u8d44\u6e90\uff08\u7c7b\u4f3c\u4e8ewait,waitpid) <\/span> <span style=\"font-size:18px;\"> \u4f46\u662f\u8c03\u7528pthread_join(pthread_id)\u540e\uff0c\u5982\u679c\u8be5\u7ebf\u7a0b\u6ca1\u6709\u8fd0\u884c\u7ed3<br \/>\n\u675f\uff0c\u8c03\u7528\u8005\u4f1a\u88ab\u963b\u585e\uff0c\u5728\u6709\u4e9b\u60c5\u51b5\u4e0b\u6211\u4eec\u5e76\u4e0d\u5e0c\u671b\u5982\u6b64\uff0c\u6bd4\u5982\u5728Web\u670d\u52a1\u5668\u4e2d\u5f53\u4e3b\u7ebf\u7a0b\u4e3a\u6bcf\u4e2a\u65b0\u6765\u7684\u94fe\u63a5\u521b\u5efa\u4e00\u4e2a\u5b50\u7ebf\u7a0b\u8fdb\u884c\u5904\u7406\u7684\u65f6\u5019\uff0c\u4e3b\u7ebf\u7a0b\u5e76\u4e0d\u5e0c\u671b\u56e0\u4e3a\u8c03<br \/>\n\u7528pthread_join\u800c\u963b\u585e\uff08\u56e0\u4e3a\u8fd8\u8981\u7ee7\u7eed\u5904\u7406\u4e4b\u540e\u5230\u6765\u7684\u94fe\u63a5\uff09\uff0c\u8fd9\u65f6\u53ef\u4ee5\u5728\u5b50\u7ebf\u7a0b\u4e2d\u52a0\u5165\u4ee3\u7801 <\/span> <span style=\"font-size:18px;\"> pthread_detach(pthread_self()) <\/span> <span style=\"font-size:18px;\"> \u6216\u8005\u7236\u7ebf\u7a0b\u8c03\u7528 <\/span> <span style=\"font-size:18px;\"> pthread_detach(thread_id)\uff08\u975e\u963b\u585e\uff0c\u53ef\u7acb\u5373\u8fd4\u56de\uff09 <\/span> <span style=\"font-size:18px;\"> \u8fd9\u5c06\u8be5\u5b50\u7ebf\u7a0b\u7684\u72b6\u6001\u8bbe\u7f6e\u4e3adetached,\u5219\u8be5\u7ebf\u7a0b\u8fd0\u884c\u7ed3\u675f\u540e\u4f1a\u81ea\u52a8\u91ca\u653e\u6240\u6709\u8d44\u6e90\u3002<\/span><br \/>\n<\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">&nbsp;<\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><b>\u7ebf\u7a0b<\/b>\u7684\u672c\u8d28\uff1a<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u5728<\/span><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">Linux<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u4e2d\uff0c\u65b0\u5efa\u7684<b>\u7ebf\u7a0b<\/b>\u5e76\u4e0d\u662f\u5728\u539f\u5148\u7684\u8fdb\u7a0b\u4e2d\uff0c\u800c\u662f\u7cfb\u7edf\u901a\u8fc7<\/span><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\"> <\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u4e00\u4e2a\u7cfb\u7edf\u8c03\u7528<\/span><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">clone()<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u3002\u8be5\u7cfb\u7edf<\/span><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">copy<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u4e86\u4e00\u4e2a\u548c\u539f\u5148\u8fdb\u7a0b\u5b8c\u5168\u4e00\u6837\u7684\u8fdb\u7a0b\uff0c\u5e76\u5728\u8fd9\u4e2a\u8fdb\u7a0b\u4e2d\u6267\u884c<b>\u7ebf\u7a0b<\/b>\u51fd\u6570\u3002\u4e0d\u8fc7\u8fd9\u4e2a<\/span><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">copy<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u8fc7\u7a0b\u548c<\/span><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">fork<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u4e0d\u4e00\u6837\u3002<\/span><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\"> copy<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u540e\u7684\u8fdb\u7a0b\u548c\u539f\u5148\u7684\u8fdb\u7a0b\u5171\u4eab\u4e86\u6240\u6709\u7684\u53d8\u91cf\uff0c\u8fd0\u884c\u73af\u5883\u3002\u6240\u4ee5\u7ebf\u7a0b\u662f\u5171\u4eab\u5168\u5c40\u53d8\u91cf\u548c\u73af\u5883\u7684\u3002<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-size:small;font-family:\u5b8b\u4f53;\">&nbsp; <\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\">\u4ee5\u4e0a<span style=\"background-color:#ffffff;\">\u7ebf\u7a0b<\/span>\u521b\u5efa\u51fd\u6570\u5728<span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\">libpthread.so<\/span><\/span><span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\">\uff0c\u6545\u7f16\u8bd1\u7684\u65f6\u5019 <span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\">gcc \u2013o&nbsp;<\/span><\/span><\/span><\/span><span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\"><span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\">test <span style=\"background-color:#b8d100;\">\u2013lpthread <\/span>test.c<\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t&nbsp;\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\"><span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\">\u50f5\u5c38\u7ebf\u7a0b\u7684\u4ea7\u751f\uff1a<\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\"><span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\">\u521b\u5efa\u7ebf\u7a0b\u7684\u4e3b\u8fdb\u7a0b\u5fc5\u987b\u901a\u8fc7<span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>join\u963b\u585e\u6216\u8005while(1)\u6b7b\u7b49\uff0c\u4e0d\u7136\uff0c\u4e3b\u7ebf\u7a0b\u9a6c\u4e0a\u7ed3\u675f\uff0c\u4ece\u800c\u4f7f\u521b\u5efa\u7684<b>\u7ebf\u7a0b<\/b>\u6ca1\u6709\u673a\u4f1a\u5f00\u59cb\u6267\u884c\u5c31\u7ed3\u675f\u4e86\u3002<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\"><span style=\"font-size:14pt;\" lang=\"EN-US\"><span style=\"font-family:Times New Roman;\"><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">\u72b6\u6001\u4e0d\u53ef\u5206\u79bb\u7ebf\u7a0b\uff0c\u5982\u679c\u4e3b\u7ebf\u7a0b\u5fd9\u7b49\uff0c\u90a3\u4e48\u5df2\u7ecf\u7ed3\u675f\u7684\u7ebf\u7a0b\uff0c\u8d44\u6e90\u5f97\u4e0d\u5230\u56de\u6536\uff0c\u4e5f\u65e0\u6cd5\u88ab\u91cd\u65b0\u8c03\u5ea6\uff0c\u8fd9\u65f6\u5c31\u6210\u4e3a\u50f5\u5c38\u7ebf\u7a0b\u4e86\u3002\u4e3b\u7ebf\u7a0b\u91c7\u7528<span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>join\u7b49\u5f85\u7684\u65f6\u5019\uff0c\u4e5f\u6709\u53ef\u80fd\u4ea7\u751f\u50f5\u5c38\u7ebf\u7a0b\u3002\u53e6\u5916\uff0c<span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">\u540c\u4e00\u7ebf\u7a0b\u4e0d\u53ef\u4ee5\u88ab\u591a\u4e2a\u7ebf\u7a0b\u540c\u65f6pthread<b>_<\/b>join\uff0c\u5426\u5219\u7b2c\u4e8c\u4e2a\u5f00\u59cb\u5c31\u8fd4\u56de\u9519\u8bef<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<div style=\"word-wrap:break-word;\" class=\"Blog_wz1\">\n<p>\n\t\t<span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>join\uff08\uff09\uff1a<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u4f7f\u4e00\u4e2a<b>\u7ebf\u7a0b<\/b>\u7b49\u5f85\u53e6\u4e00\u4e2a<b>\u7ebf\u7a0b<\/b>\u7ed3\u675f<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>self()\uff1a<\/span><\/span><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">\u83b7\u5f97\u81ea\u8eab\u7684<b>\u7ebf\u7a0b<\/b>\u53f7<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">pthread_create():\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7ebf\u7a0b<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\">pthread_detach():\u8bbe\u7f6e\u7ebf\u7a0b\u4e3a\u53ef\u5206\u79bb\u72b6\u6001\uff0cpthread\u6709\u4e24\u79cd\u72b6\u6001joinable\u72b6\u6001\u548cunjoinable\u72b6\u6001<\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>exit()\uff1a\u901a\u8fc7\u81ea\u8eab\u6765\u7ed3\u675f\u7ebf\u7a0b\uff0c\u5e76\u91ca\u653e\u8d44\u6e90<\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">pthread<b>_<\/b>cancel()\uff1a\u901a\u8fc7\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u91ca\u653e\u8d44\u6e90<\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t<span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-family:\u5b8b\u4f53;font-size:14pt;\"><span style=\"font-family:Tahoma;\"><span style=\"font-size:14pt;\"><span style=\"font-family:Times New Roman;\">&amp;&#8230;<\/span><\/span><\/span><\/span><\/span><\/span>\n\t<\/p>\n<p>\n\t\t\n\t<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[332],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u4e0b\u7684\u50f5\u5c38\u7ebf\u7a0b - Wayne&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/weizn.net\/?p=54\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u4e0b\u7684\u50f5\u5c38\u7ebf\u7a0b - Wayne&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"pthread_join\uff08\uff09\uff1a\u4f7f\u4e00\u4e2a\u7ebf\u7a0b\u7b49\u5f85\u53e6\u4e00\u4e2a\u7ebf\u7a0b\u7ed3\u675f     pthread_self()\uff1a\u83b7\u5f97\u81ea\u8eab\u7684\u7ebf\u7a0b\u53f7     pthread_create():\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7ebf\u7a0b     pthread_detach():\u8bbe\u7f6e\u7ebf\u7a0b\u4e3a\u53ef\u5206\u79bb\u72b6\u6001\uff0cpthread\u6709\u4e24\u79cd\u72b6\u6001joinable\u72b6\u6001\u548cunjoinable\u72b6\u6001     pthread_exit()\uff1a\u901a\u8fc7\u81ea\u8eab\u6765\u7ed3\u675f\u7ebf\u7a0b\uff0c\u5e76\u91ca\u653e\u8d44\u6e90     pthread_cancel()\uff1a\u901a\u8fc7\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u91ca\u653e\u8d44\u6e90     &amp;...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/weizn.net\/?p=54\" \/>\n<meta property=\"og:site_name\" content=\"Wayne&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2013-12-14T14:22:30+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"zinan\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/weizn.net\/#website\",\"url\":\"http:\/\/weizn.net\/\",\"name\":\"Wayne&#039;s Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/weizn.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/weizn.net\/?p=54#webpage\",\"url\":\"http:\/\/weizn.net\/?p=54\",\"name\":\"Linux\\u4e0b\\u7684\\u50f5\\u5c38\\u7ebf\\u7a0b - Wayne&#039;s Blog\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/#website\"},\"datePublished\":\"2013-12-14T14:22:30+00:00\",\"dateModified\":\"2013-12-14T14:22:30+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/weizn.net\/?p=54#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/weizn.net\/?p=54\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/weizn.net\/?p=54#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u9996\\u9875\",\"item\":\"http:\/\/weizn.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\\u4e0b\\u7684\\u50f5\\u5c38\\u7ebf\\u7a0b\"}]},{\"@type\":\"Article\",\"@id\":\"http:\/\/weizn.net\/?p=54#article\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/?p=54#webpage\"},\"author\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"headline\":\"Linux\\u4e0b\\u7684\\u50f5\\u5c38\\u7ebf\\u7a0b\",\"datePublished\":\"2013-12-14T14:22:30+00:00\",\"dateModified\":\"2013-12-14T14:22:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/weizn.net\/?p=54#webpage\"},\"wordCount\":65,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"articleSection\":[\"Linux\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/weizn.net\/?p=54#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\",\"name\":\"zinan\",\"logo\":{\"@id\":\"http:\/\/weizn.net\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u4e0b\u7684\u50f5\u5c38\u7ebf\u7a0b - Wayne&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/weizn.net\/?p=54","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u4e0b\u7684\u50f5\u5c38\u7ebf\u7a0b - Wayne&#039;s Blog","og_description":"pthread_join\uff08\uff09\uff1a\u4f7f\u4e00\u4e2a\u7ebf\u7a0b\u7b49\u5f85\u53e6\u4e00\u4e2a\u7ebf\u7a0b\u7ed3\u675f     pthread_self()\uff1a\u83b7\u5f97\u81ea\u8eab\u7684\u7ebf\u7a0b\u53f7     pthread_create():\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7ebf\u7a0b     pthread_detach():\u8bbe\u7f6e\u7ebf\u7a0b\u4e3a\u53ef\u5206\u79bb\u72b6\u6001\uff0cpthread\u6709\u4e24\u79cd\u72b6\u6001joinable\u72b6\u6001\u548cunjoinable\u72b6\u6001     pthread_exit()\uff1a\u901a\u8fc7\u81ea\u8eab\u6765\u7ed3\u675f\u7ebf\u7a0b\uff0c\u5e76\u91ca\u653e\u8d44\u6e90     pthread_cancel()\uff1a\u901a\u8fc7\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u91ca\u653e\u8d44\u6e90     &amp;...","og_url":"http:\/\/weizn.net\/?p=54","og_site_name":"Wayne&#039;s Blog","article_published_time":"2013-12-14T14:22:30+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"zinan"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/weizn.net\/#website","url":"http:\/\/weizn.net\/","name":"Wayne&#039;s Blog","description":"","publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/weizn.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"http:\/\/weizn.net\/?p=54#webpage","url":"http:\/\/weizn.net\/?p=54","name":"Linux\u4e0b\u7684\u50f5\u5c38\u7ebf\u7a0b - Wayne&#039;s Blog","isPartOf":{"@id":"http:\/\/weizn.net\/#website"},"datePublished":"2013-12-14T14:22:30+00:00","dateModified":"2013-12-14T14:22:30+00:00","breadcrumb":{"@id":"http:\/\/weizn.net\/?p=54#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/weizn.net\/?p=54"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/weizn.net\/?p=54#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/weizn.net\/"},{"@type":"ListItem","position":2,"name":"Linux\u4e0b\u7684\u50f5\u5c38\u7ebf\u7a0b"}]},{"@type":"Article","@id":"http:\/\/weizn.net\/?p=54#article","isPartOf":{"@id":"http:\/\/weizn.net\/?p=54#webpage"},"author":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"headline":"Linux\u4e0b\u7684\u50f5\u5c38\u7ebf\u7a0b","datePublished":"2013-12-14T14:22:30+00:00","dateModified":"2013-12-14T14:22:30+00:00","mainEntityOfPage":{"@id":"http:\/\/weizn.net\/?p=54#webpage"},"wordCount":65,"commentCount":0,"publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"articleSection":["Linux"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/weizn.net\/?p=54#respond"]}]},{"@type":["Person","Organization"],"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264","name":"zinan","logo":{"@id":"http:\/\/weizn.net\/#personlogo"}}]}},"_links":{"self":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":0,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}