{"id":124731,"date":"2020-06-14T21:45:39","date_gmt":"2020-06-14T13:45:39","guid":{"rendered":"http:\/\/4563.org\/?p=124731"},"modified":"2020-06-14T21:45:39","modified_gmt":"2020-06-14T13:45:39","slug":"%e8%af%b7%e6%95%99-node-js-%e5%90%af%e5%8a%a8%e5%a4%96%e9%83%a8%e7%a8%8b%e5%ba%8f%e5%90%8e%e7%9a%84%e5%9b%9e%e6%94%b6%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=124731","title":{"rendered":"\u8bf7\u6559 node.js \u542f\u52a8\u5916\u90e8\u7a0b\u5e8f\u540e\u7684\u56de\u6536\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u6559 node.js \u542f\u52a8\u5916\u90e8\u7a0b\u5e8f\u540e\u7684\u56de\u6536\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wingpui <\/span>  <span><i><\/i> 8<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<ul>\n<li>\u6211\u7528 C++\u5f00\u53d1\u4e86\u4e00\u4e2a\u672c\u5730\u4ee3\u7406\u7a0b\u5e8f\uff0c\u5b83\u4f1a\u542f\u52a8\u989d\u5916\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u3002<\/li>\n<li>\u73b0\u5728\u9047\u5230\u4e00\u4e2a\u95ee\u9898\uff1a\u5f53\u8fd9\u4e2a<code>\u672c\u5730\u4ee3\u7406\u7a0b\u5e8f<\/code>\u88ab node.js \u542f\u52a8\u540e\uff0c\u5f53 node.js \u9000\u51fa\u7684\u65f6\u5019\uff0c\u6211\u7684<code>\u672c\u5730\u4ee3\u7406\u7a0b\u5e8f<\/code>\u8be5\u5982\u4f55\u54cd\u5e94 node.js \u7684 kill \u6d88\u606f\uff08 windows \u5e73\u53f0\uff09\uff1f<\/li>\n<li>\u5927\u5bb6\u5bf9<code>\u672c\u5730\u4ee3\u7406\u7a0b\u5e8f<\/code>\u88ab\u5173\u95ed\u7684\u65f6\u5019\uff0c<code>\u989d\u5916\u7684\u53ef\u6267\u884c\u7a0b\u5e8f<\/code>\u5e94\u8be5\u5982\u4f55\u5173\u95ed\u6709\u4ec0\u4e48\u5efa\u8bae\u5417\uff1f<\/li>\n<\/ul><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>7<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"2138674\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zy445566 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             process \u76d1\u542c SIGINT \u548c SIGTERM\uff0c\u7136\u540e\u7ed9\u672c\u5730\u4ee3\u7406\u7a0b\u5e8f\u53d1\u6d88\u606f\u7ed3\u675f\u6216\u8005\u600e\u4e48\u6837\u4e0d\u5c31\u597d\u4e86\u3002<\/p>\n<p>\u5176\u5b9e\u6211\u5efa\u8bae\u6709\u6761\u4ef6\u628a C++\u79fb\u690d\u5230 wasm\uff0c\u8981\u6b7b\u548c nodejs \u4e00\u8d77\u6b7b\uff0c\u7701\u7684\u76f8\u4e92\u901a\u8baf\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2138675\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ysc3839 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Unix \u7684\u8bdd\u597d\u50cf process tree \u4f1a\u8ddf\u7740\u5173\u95ed\u7684\uff0c\u4e0d\u8fc7\u4f3c\u4e4e\u901a\u8fc7 fork \u53ef\u4ee5\u8131\u79bb\u51fa\u53bb\uff1f\u5177\u4f53\u60c5\u51b5\u6211\u6ca1\u4e86\u89e3\u8fc7\u3002<br \/>Windows \u7684\u8bdd\u53ef\u4ee5\u4f7f\u7528 Job Objects\uff0c\u628a\u5b50\u8fdb\u7a0b\u90fd\u653e\u5728\u4e00\u4e2a Job \u91cc\u9762\uff0c\u7136\u540e\u8bbe\u7f6e Job \u91ca\u653e\u65f6\u7ed3\u675f\u8fdb\u7a0b\u3002\u8fd9\u79cd\u65b9\u6cd5\u76f4\u63a5\u542f\u52a8\u5b50\u8fdb\u7a0b\u6ca1\u529e\u6cd5\u7ed5\u8fc7\uff0c\u53ea\u80fd\u4f9d\u8d56\u4e0d\u5728 Job \u5185\u7684\u7a0b\u5e8f\u4ee3\u66ff\u542f\u52a8\u65b0\u8fdb\u7a0b\u624d\u80fd\u7ed5\u8fc7\u3002<br \/>https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/procthread\/job-objects                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2138676\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wingpui <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zy445566 \u7136\u800c\u76d1\u542c\u4e0d\u5230\u8fd9\u4e24\u4e2a\u6d88\u606f\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2138677\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wingpui <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zy445566 \u5bf9 wasm \u4e0d\u4e86\u89e3\u5462\uff0c\u6709\u80fd\u76f4\u63a5\u8f6c\u7684\u5de5\u5177\u5417\uff1f\u7528\u5230\u591a\u7ebf\u7a0b\u7684\u8bdd\u4e0d\u597d\u8f6c\u5427\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2138678\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wingpui <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zy445566                                                             <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2138679\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wingpui <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ysc3839 \u611f\u8c22\u5927\u4f6c\u3002\u611f\u89c9\u4f5c\u4e1a\u6bd4\u8f83\u8d34\u8fd1 node \u7684\u5e95\u5c42\u5b9e\u73b0                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2138680\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lxhlxh520 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             windows \u5e73\u53f0\u53ef\u4ee5\u542f\u52a8\u4e00\u4e2a\u7ebf\u7a0b\u8c03\u7528 WaitForSingleObject \u7b49\u5f85,nodejs \u9000\u51fa\u7684\u65f6\u5019\u4f1a\u89e6\u53d1,\u7136\u540e\u901a\u77e5\u4e3b\u7ebf\u7a0b\u8ddf\u7740\u9000\u51fa                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6559 node.js \u542f\u52a8\u5916\u90e8\u7a0b\u5e8f&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/124731"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=124731"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/124731\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=124731"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=124731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}