{"id":6301,"date":"2020-01-19T19:38:41","date_gmt":"2020-01-19T11:38:41","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6301"},"modified":"2020-01-21T16:28:20","modified_gmt":"2020-01-21T08:28:20","slug":"disown","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/disown","title":{"rendered":"disown\u547d\u4ee4 – \u4ece\u5f53\u524d\u7684shell\u4e2d\u79fb\u9664\u4f5c\u4e1a"},"content":{"rendered":"\n

disown\u547d\u4ee4\u53ef\u4ee5\u4ece\u5f53\u524dshell\u7684\u4f5c\u4e1a\u5217\u8868\u4e2d\u79fb\u9664\u5168\u90e8\u4f5c\u4e1a\uff0c\u4e5f\u53ef\u79fb\u9664\u6307\u5b9a\u7684\u4e00\u5230\u591a\u4e2a\u4f5c\u4e1a\uff1b\u6b63\u5728\u8fd0\u884c\u7684\u4f5c\u4e1a\u4e5f\u53ef\u4ee5\u79fb\u9664\uff1b\u4e5f\u53ef\u4ee5\u6807\u8bb0\u4f5c\u4e1a\uff0c\u4f7f\u5f97\u5b83\u4eec\u5728\u5f53\u524dshell\u9000\u51fa\u540e\u4e5f\u4e0d\u4f1a\u7ed3\u675f\u3002<\/p>\n\n\n\n

\u8be5\u547d\u4ee4\u9700\u8981set\u9009\u9879monitor\u5904\u4e8e\u5f00\u542f\u72b6\u6001\u65f6\u624d\u80fd\u6267\u884c\uff1b\u67e5\u770b\u4f5c\u4e1a\u63a7\u5236\u72b6\u6001\uff1a\u8f93\u5165set -o\u67e5\u770b monitor\u884c\uff1b\u6267\u884cset -o monitor\u6216set -m\u5f00\u542f\u8be5\u9009\u9879\u3002disown\u547d\u4ee4\u8be5\u547d\u4ee4\u662fbash\u5185\u5efa\u547d\u4ee4\uff0c\u76f8\u5173\u7684\u5e2e\u52a9\u4fe1\u606f\u8bf7\u67e5\u770bhelp\u547d\u4ee4\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f:<\/strong> disown [\u53c2\u6570] [\u6807\u8bc6\u7b26or\u8fdb\u7a0bID]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-h<\/td>\u6807\u8bb0\u6bcf\u4e2a\u4f5c\u4e1a\u6807\u8bc6\u7b26\uff0c\u8fd9\u4e9b\u4f5c\u4e1a\u5c06\u4e0d\u4f1a\u5728shell\u63a5\u6536\u5230sighup\u4fe1\u53f7\u65f6\u63a5\u6536\u5230sighup\u4fe1\u53f7<\/td><\/tr>
-a<\/td>\u79fb\u9664\u6240\u6709\u7684\u4f5c\u4e1a<\/td><\/tr>
-r<\/td>\u79fb\u9664\u8fd0\u884c\u7684\u4f5c\u4e1a<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u5220\u9664\u5168\u90e8\u4f5c\u4e1a\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# disown -a<\/pre>\n\n\n\n

\u5220\u9664\u8fd0\u884c\u72b6\u6001\u7684\u4f5c\u4e1a\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# disown -r<\/pre>\n\n\n\n

\u6839\u636ejobId\uff0c\u79fb\u51fa\u6307\u5b9a\u7684\u540e\u53f0\u4efb\u52a1\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# disown %2\n[root@linuxcool ~]# disown -h %2 <\/pre>\n","protected":false},"excerpt":{"rendered":"

disown\u547d\u4ee4\u53ef\u4ee5\u4ece\u5f53\u524dshell\u7684\u4f5c\u4e1a\u5217\u8868\u4e2d\u79fb\u9664\u5168\u90e8\u4f5c\u4e1a\uff0c\u4e5f\u53ef\u79fb\u9664\u6307\u5b9a\u7684\u4e00\u5230\u591a\u4e2a\u4f5c\u4e1a\uff1b\u6b63\u5728\u8fd0\u884c\u7684\u4f5c\u4e1a\u4e5f\u53ef\u4ee5 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6301"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6301"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6301\/revisions"}],"predecessor-version":[{"id":6448,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6301\/revisions\/6448"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}