{"id":159067,"date":"2020-09-23T05:58:49","date_gmt":"2020-09-22T21:58:49","guid":{"rendered":"http:\/\/4563.org\/?p=159067"},"modified":"2020-09-23T05:58:49","modified_gmt":"2020-09-22T21:58:49","slug":"%e3%80%8e%e8%af%b7%e6%95%99%e3%80%8fc%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e7%b1%bb%e4%bc%bc-java-%e7%9a%84-runtime-getruntime-addshutdownhook%e6%96%b9%e6%b3%95%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=159067","title":{"rendered":"\u300e\u8bf7\u6559\u300fc#\u5982\u4f55\u5b9e\u73b0\u7c7b\u4f3c Java \u7684 Runtime.getRuntime().addShutdownHook()\u65b9\u6cd5\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u300e\u8bf7\u6559\u300fc#\u5982\u4f55\u5b9e\u73b0\u7c7b\u4f3c Java \u7684 Runtime.getRuntime().addShutdownHook()\u65b9\u6cd5\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : youla <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u9700\u8981\u4f7f\u7528 C#\u76d1\u542c\u53e6\u4e00\u4e2a\u8f6f\u4ef6\u7684\u8fd0\u884c\u72b6\u6001\u3002<\/p>\n<p>\u8fd8\u5728\u770b EasyHook \u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3416452\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wysnylc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7ed9\u4f60\u4e00\u4e2a\u5907\u7528\u65b9\u6848,\u5b9a\u65f6\u68c0\u67e5\u8fdb\u7a0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3416453\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Rwing <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             AppDomain.CurrentDomain.ProcessExit \uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3416454\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : youla <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wysnylc \u6211\u73b0\u5728\u4e5f\u53ea\u4f1a\u8fd9\u6837\u505a\uff0c\u4e0d\u8fc7 Process \u91cc\u9762\u6709\u4e2a WaitForExit()\u65b9\u6cd5\uff0c\u5199\u5728\u4e00\u4e2a\u5faa\u73af\u91cc\u4e5f\u80fd\u5b9e\u73b0\uff0c\u5c31\u662f\u611f\u89c9\u4e0d\u5b8c\u7f8e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3416455\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : youla <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Rwing \u4e0d\u662f\u62c9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3416456\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SoloCompany <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u6ca1\u8bb0\u9519\u7684\u8bdd java \u7684 addShutdownHook \u53ea\u80fd\u7ed9\u81ea\u8eab\u8fdb\u7a0b\u52a0 shutdown hook \u800c\u4e0d\u662f\u5982\u4f60\u6240\u60f3\u8c61\u90a3\u6837\u7528\u6765\u76d1\u542c\u53e6\u4e00\u4e2a\u8fdb\u7a0b\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3416457\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : youla <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @SoloCompany \u624d\u53d1\u73b0\uff0c\u662f\u6211\u5f53\u65f6\u7406\u89e3\u9519\u4e86\uff0c\u591a\u8c22\u6307\u6559\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u300e\u8bf7\u6559\u300fc#\u5982\u4f55\u5b9e\u73b0\u7c7b\u4f3c Java&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\/159067"}],"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=159067"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/159067\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159067"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}