{"id":56782,"date":"2025-08-14T23:16:08","date_gmt":"2025-08-14T15:16:08","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/56782.html"},"modified":"2025-08-14T23:16:08","modified_gmt":"2025-08-14T15:16:08","slug":"%e3%80%90linux%e7%b3%bb%e7%bb%9f%e3%80%91%e8%bf%9b%e7%a8%8b%e7%9a%84%e7%94%9f%e5%91%bd%e6%97%85%e7%a8%8b%ef%bc%9a%e4%bb%8e%e5%88%9b%e5%bb%ba%e5%88%b0%e7%8b%ac%e7%ab%8b%e7%9a%84%e6%bc%94%e7%bb%8e","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/56782.html","title":{"rendered":"\u3010Linux\u7cfb\u7edf\u3011\u8fdb\u7a0b\u7684\u751f\u547d\u65c5\u7a0b\uff1a\u4ece\u521b\u5efa\u5230\u72ec\u7acb\u7684\u6f14\u7ece"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u4e00. \u8fdb\u7a0b\u6982\u5ff5<\/li>\n<li>\u4e8c. \u67e5\u770b\u8fdb\u7a0b\u7684\u65b9\u6cd5<\/li>\n<li>\n<ul>\n<li>2.1 getpid() &amp;&amp; getppid() \u51fd\u6570<\/li>\n<li>2.2 ps &amp;&amp; grep \u6307\u4ee4<\/li>\n<li>2.3 \/proc \u76ee\u5f55<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09. \u521b\u5efa\u8fdb\u7a0b<\/li>\n<li>\n<ul>\n<li>3.1 fork() \u51fd\u6570<\/li>\n<li>3.2 \u5173\u4e8efork\u7684\u95ee\u9898<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>\u4e00. \u8fdb\u7a0b\u6982\u5ff5<\/h2>\n<p>\u8fdb\u7a0b&#xff08;Process&#xff09;\u662f\u8ba1\u7b97\u673a\u4e2d\u6b63\u5728\u6267\u884c\u7684\u7a0b\u5e8f\u7684\u4e00\u4e2a\u5b9e\u4f8b\u3002\u5b83\u662f\u64cd\u4f5c\u7cfb\u7edf\u8d44\u6e90\u5206\u914d\u548c\u8c03\u5ea6\u7684\u57fa\u672c\u5355\u4f4d&#xff0c;\u662f\u64cd\u4f5c\u7cfb\u7edf\u7ba1\u7406\u8ba1\u7b97\u673a\u786c\u4ef6\u548c\u8f6f\u4ef6\u8d44\u6e90\u65f6\u7684\u6838\u5fc3\u6982\u5ff5\u4e4b\u4e00\u3002<\/p>\n<p>\u7a0b\u5e8f\u4e0e\u8fdb\u7a0b\u7684\u533a\u522b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u7a0b\u5e8f&#xff1a;\u662f\u4e00\u7ec4\u9759\u6001\u7684\u6307\u4ee4\u96c6\u5408&#xff08;\u4e8c\u8fdb\u5236\u6587\u4ef6&#xff09;&#xff0c;\u5b83\u662f\u4e00\u4e2a\u9759\u6001\u7684\u5b9e\u4f53&#xff0c;\u4e0d\u4f1a\u5360\u7528\u8ba1\u7b97\u673a\u7684\u7cfb\u7edf\u8d44\u6e90\u3002<\/p>\n<\/li>\n<li>\n<p>\u8fdb\u7a0b&#xff1a;\u662f\u7a0b\u5e8f\u7684\u6267\u884c\u5b9e\u4f8b&#xff0c;\u5b83\u662f\u52a8\u6001\u7684&#xff0c;\u5e76\u4e14\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u4f1a\u5360\u7528\u7cfb\u7edf\u8d44\u6e90&#xff08;\u5982CPU\u65f6\u95f4\u3001\u5185\u5b58\u7b49&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u5185\u5b58\u5728\u540c\u4e00\u65f6\u95f4\u4f1a\u6709\u6210\u767e\u4e0a\u5343\u7684\u88ab\u52a0\u8f7d\u8fdb\u6765\u7684\u7a0b\u5e8f&#xff0c;\u64cd\u4f5c\u7cfb\u7edf\u662f\u9700\u8981\u5bf9\u5176\u8fdb\u884c\u7ba1\u7406\u7684\u3002<\/p>\n<p>\u64cd\u4f5c\u7cfb\u7edf\u4f1a\u7ed9\u6bcf\u4e2a\u4ee3\u7801\u548c\u6570\u636e\u5757\u5efa\u7acb\u4e00\u4e2astruct\u7ed3\u6784\u4f53&#xff08;\u8fdb\u7a0b\u63a7\u5236\u5757&#xff09;&#xff0c;\u7ed3\u6784\u4f53\u5b58\u7684\u662f\u5bf9\u4ee3\u7801\u548c\u6570\u636e\u5757\u7684\u4fe1\u606f&#xff0c;\u4e5f\u6709\u76f8\u5e94\u7684\u6307\u9488\u6307\u5411\u5bf9\u5e94\u7684\u4ee3\u7801\u548c\u6570\u636e\u3002\u8bb8\u591a\u8fd9\u6837\u7684\u7ed3\u6784\u4f53\u7ec4\u6210\u53cc\u94fe\u8868&#xff0c;\u4e5f\u5c31\u662f\u8fdb\u7a0b\u5217\u8868\u3002<\/p>\n<p>\u8fdb\u7a0b\u63a7\u5236\u5757PCB\u2192Process Control Block<\/p>\n<p>Linux\u7cfb\u7edf\u4e2dPCB\u662ftask_struct<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151559-689dfdaf33ed2.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> PCB\u76f8\u5173\u5185\u5bb9&#xff1a;https:\/\/www.cnblogs.com\/tongyan2\/p\/5544887.html<\/p>\n<p>\u603b\u7ed3&#xff1a;\u8fdb\u7a0b &#061; PCB(task_struct) &#043; \u5bf9\u5e94\u7684\u4ee3\u7801\u548c\u6570\u636e<\/p>\n<p>\u8fdb\u7a0b\u4fe1\u606f\u88ab\u653e\u5728\u8fdb\u7a0b\u63a7\u5236\u5757\u4e2d&#xff0c;\u53ef\u4ee5\u7406\u89e3\u4e3a\u8fdb\u7a0b\u5c5e\u6027\u7684\u96c6\u5408\u3002\u64cd\u4f5c\u7cfb\u7edf\u8981\u5bf9\u8fdb\u7a0b\u8fdb\u884c\u7ba1\u7406&#xff0c;\u5176\u5b9e\u5c31\u662f\u5bf9\u63cf\u8ff0\u8fdb\u7a0b\u7684task_struct\u5f62\u6210\u7684\u6570\u636e\u7ed3\u6784\u8fdb\u884c\u589e\u5220\u67e5\u6539\u3002<\/p>\n<p>\u6ce8&#xff1a;\u6211\u4eec\u5728Linux\u6267\u884c\u7684\u6307\u4ee4\u3001\u5de5\u5177\u3001\u7a0b\u5e8f&#xff0c;\u8fd0\u884c\u8d77\u6765\u90fd\u662f\u8fdb\u7a0b<\/p>\n<hr \/>\n<h2>\u4e8c. \u67e5\u770b\u8fdb\u7a0b\u7684\u65b9\u6cd5<\/h2>\n<h3>2.1 getpid() &amp;&amp; getppid() \u51fd\u6570<\/h3>\n<p><span class=\"token function\">getpid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token comment\">\/\/\u83b7\u53d6\u8fdb\u7a0bpid<\/span><br \/>\n<span class=\"token function\">getppid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token comment\">\/\/\u83b7\u53d6\u7236\u8fdb\u7a0bpid<\/span><\/p>\n<ul>\n<li>pid \u5c31\u662f\u8fdb\u7a0b\u7684\u6807\u8bc6\u7b26&#xff08;\u7f16\u53f7&#xff09;&#xff1b;<\/li>\n<li>\u8fd9\u4e24\u4e2a\u51fd\u6570\u90fd\u662f\u7cfb\u7edf\u8c03\u7528<\/li>\n<\/ul>\n<p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 man 2 getpid \u6765\u67e5\u770b\u76f8\u5173\u4fe1\u606f\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151600-689dfdb02909e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5176\u8fd4\u56de\u503c\u5c31\u662f\u4e00\u4e2a\u6574\u578b\u53d8\u91cf&#xff0c;\u6210\u529f\u8c03\u7528\u8fd4\u56de\u4e00\u4e2a\u5927\u4e8e0\u7684\u6574\u6570&#xff0c;\u5931\u8d25\u5c31\u8fd4\u56de-1\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151600-689dfdb08d4c5.png\" alt=\"\" \/><\/p>\n<hr \/>\n<h3>2.2 ps &amp;&amp; grep \u6307\u4ee4<\/h3>\n<p><span class=\"token function\">ps<\/span> axj <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-1<\/span> <span class=\"token punctuation\">;<\/span> <span class=\"token function\">ps<\/span> axj <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> mypro\/\/\u67e5\u770bmypro\u8fdb\u7a0b\u76f8\u5173\u4fe1\u606f<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151600-689dfdb0c07e0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u7531\u4e8egrep\u672c\u6765\u4e5f\u662f\u4e2a\u8fdb\u7a0b&#xff0c;\u67e5\u627emypro\u8fdb\u7a0b&#xff0c;grep\u8fdb\u7a0b\u5c31\u4f1a\u5e26\u4e0amypro\u7684\u5173\u952e\u5b57&#xff0c;\u90a3\u4e48\u67e5\u51fa\u6765\u7684\u8fdb\u7a0b\u4e5f\u4f1a\u6709grep\u8fdb\u7a0b&#xff0c;\u8981\u5c4f\u853d\u7684\u8bdd\u5c31\u4f7f\u7528grep -v\u53cd\u5411\u5339\u914d<\/p>\n<p><span class=\"token function\">ps<\/span> axj <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-1<\/span> <span class=\"token punctuation\">;<\/span> <span class=\"token function\">ps<\/span> axj <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> mypro <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-v<\/span> <span class=\"token function\">grep<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151601-689dfdb134c85.png\" alt=\"\" \/><\/p>\n<hr \/>\n<h3>2.3 \/proc \u76ee\u5f55<\/h3>\n<p><span class=\"token function\">ls<\/span> \/proc<\/p>\n<p>ls \/proc \u4ee5\u6587\u4ef6\u7684\u65b9\u5f0f\u67e5\u770b\u8fdb\u7a0b&#xff0c;proc\u76ee\u5f55\u8bb0\u5f55\u8fdb\u7a0b\u4fe1\u606f&#xff0c;\u6bcf\u4e2a\u6570\u5b57\u76ee\u5f55\u4ee3\u8868\u4e00\u4e2a\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b&#xff0c;\u8fdb\u7a0b\u7ed3\u675f\u540e&#xff0c;\u5bf9\u5e94\u7684\u76ee\u5f55\u6587\u4ef6\u5c31\u4f1a\u5220\u9664\u3002<\/p>\n<p>\u6211\u4eec\u5148\u8fd0\u884c\u4e00\u4e2apid\u4e3a70816\u7684\u8fdb\u7a0b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151601-689dfdb1b5a15.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u518d\u4f7f\u7528ls \/proc\u67e5\u770b\u8fdb\u7a0b\u4fe1\u606f&#xff0c;\u53ef\u4ee5\u770b\u5230\u670970816\u7684\u6587\u4ef6\u5939\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151602-689dfdb21eb38.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u8ba9\u6211\u4eec\u76f4\u63a5\u67e5\u770b70816\u7684\u6587\u4ef6\u5939\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151602-689dfdb24c419.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151602-689dfdb26aa21.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<li>\n<p>exe \u4ee3\u8868\u6211\u4eec\u7684\u53ef\u6267\u884c\u6587\u4ef6&#xff0c;\u5982\u679c\u5c06\u5176\u5220\u9664\u4e0d\u4f1a\u5bf9\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u9020\u6210\u5f71\u54cd&#xff0c;\u56e0\u4e3a\u5220\u9664\u7684\u662f\u78c1\u76d8\u4e0a\u7684\u7a0b\u5e8f&#xff0c;\u53ef\u6267\u884c\u6587\u4ef6\u5df2\u7ecf\u88ab\u52a0\u8f7d\u5728\u5185\u5b58\u91cc\u4e86\u3002<\/p>\n<\/li>\n<li>\n<p>cmd (current work directory)\u662f\u8fdb\u7a0b\u6240\u5728\u7684\u5f53\u524d\u6587\u4ef6\u8def\u5f84&#xff0c;\u6211\u4eec\u7684\u7a0b\u5e8f\u5728\u521b\u5efa\u6587\u4ef6\u65f6\u9ed8\u8ba4\u662f\u5728\u5f53\u524d\u8def\u5f84\u4e0b\u521b\u5efa\u7684&#xff0c;\u800c\u5f53\u524d\u8def\u5f84\u5c31\u662f\u901a\u8fc7cmd\u83b7\u53d6\u7684\u3002<\/p>\n<\/li>\n<p>\u6539\u53d8\u6587\u4ef6\u8def\u5f84<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528chdir\u6539\u53d8\u5f53\u524d\u8fdb\u7a0b\u7684\u6587\u4ef6\u8def\u5f84&#xff0c;\u4ee5\u4e0b\u4e3a\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151603-689dfdb3504c0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u7ed3\u675f\u8fdb\u7a0b&#xff1a;ctrl&#043;c \u6216 kill -9 pid<\/p>\n<hr \/>\n<p>\u7236\u8fdb\u7a0bpid\u4e0d\u53d8\u73b0\u8c61&#xff1a;<\/p>\n<p>\u591a\u6b21\u542f\u52a8\u8fdb\u7a0b\u65f6&#xff0c;\u4f1a\u53d1\u73b0\u5176\u7236\u8fdb\u7a0b\u7684pid\u4e0d\u53d8&#xff0c;\u8fd9\u662f\u56e0\u4e3a\u8be5\u7236\u8fdb\u7a0b\u5176\u5b9e\u5c31\u662fbash\u8fdb\u7a0b&#xff0c;\u6211\u4eec\u6267\u884c\u7684\u7a0b\u5e8f\u6216\u8005\u6307\u4ee4\u5927\u591a\u90fd\u662fbash\u7684\u5b50\u8fdb\u7a0b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151603-689dfdb3b0752.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5f53\u5b50\u8fdb\u7a0b\u51fa\u95ee\u9898&#xff0c;\u4e0d\u4f1a\u5f71\u54cdbash\u8fdb\u884c&#xff0c;\u56e0\u4e3a\u8fdb\u7a0b\u5177\u6709\u72ec\u7acb\u6027&#xff1b;\u5f53\u6211\u4eec\u542f\u52a8xshell\u65f6&#xff0c;\u7cfb\u7edf\u81ea\u52a8\u751f\u6210bash\u8fdb\u7a0b\u3002<\/p>\n<h2>\u4e09. \u521b\u5efa\u8fdb\u7a0b<\/h2>\n<h3>3.1 fork() \u51fd\u6570<\/h3>\n<p>\u521b\u5efa\u8fdb\u7a0b\u9700\u8981\u4f7f\u7528\u7cfb\u7edf\u8c03\u7528fork\u51fd\u6570\u3002<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;unistd.h&gt;<\/span><\/span><br \/>\npid_t <span class=\"token function\">fork<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151603-689dfdb3d70fb.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<li>\n<p>fork \u7cfb\u7edf\u8c03\u7528&#xff0c;\u6ca1\u6709\u53c2\u6570&#xff0c;\u6709\u4e24\u4e2a\u8fd4\u56de\u503c<\/p>\n<\/li>\n<li>\n<p>fork \u5728\u521b\u5efa\u8fdb\u7a0b\u6210\u529f\u65f6&#xff0c;\u7ed9\u7236\u8fdb\u7a0b\u8fd4\u56de\u5b50\u8fdb\u7a0b\u7684pid&#xff0c;\u7ed9\u5b50\u8fdb\u7a0b\u8fd4\u56de0&#xff0c;\u5931\u8d25\u65f6\u8fd4\u56de-1\u7ed9\u7236\u8fdb\u7a0b&#xff08;\u6ca1\u6709\u5b50\u8fdb\u7a0b\u521b\u5efa&#xff09;\u3002\u8fd9\u6837\u505a\u7684\u539f\u56e0\u662f\u56e0\u4e3a\u7236\u8fdb\u7a0b\u4e0e\u5b50\u8fdb\u7a0b\u7684\u5173\u7cfb\u662f\u4e00\u5bf9\u591a\u7684\u5173\u7cfb&#xff0c;\u5c06\u5b50\u8fdb\u7a0b\u7684pid\u8fd4\u56de\u7ed9\u7236\u8fdb\u7a0b\u8ba9\u5176\u53ef\u4ee5\u533a\u5206\u4e0d\u540c\u7684\u5b50\u8fdb\u7a0b\u3002<\/p>\n<\/li>\n<li>\n<p>\u7236\u5b50\u8fdb\u7a0b\u4ee3\u7801\u5171\u4eab&#xff0c;\u6570\u636e\u5404\u81ea\u5f00\u8f9f\u7a7a\u95f4&#xff0c;\u79c1\u6709\u4e00\u4efd&#xff08;\u5199\u65f6\u62f7\u8d1d&#xff09;<\/p>\n<\/li>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151604-689dfdb43c022.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> fork\u7684\u4f7f\u7528\u793a\u4f8b&#xff1a;<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;stdio.h&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;sys\/types.h&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;unistd.h&gt;<\/span><\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token class-name\">pid_t<\/span> id <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">fork<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>id <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token function\">perror<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;fork&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">else<\/span> <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>id <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/\u5b50\u8fdb\u7a0b<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token function\">sleep<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token function\">printf<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;I am a child process, my pid: %d\\\\n&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">getpid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token function\">printf<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\\\\n&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">else<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/\u7236\u8fdb\u7a0b<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token function\">sleep<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token function\">printf<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;I am a fathermak process, my pid: %d\\\\n&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">getpid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151604-689dfdb45b6b3.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4ece\u4e0a\u9762\u7684\u73b0\u8c61\u6211\u4eec\u53ef\u4ee5\u770b\u51fa&#xff0c;id &#061;&#061; 0 \u548c id &gt; 0 \u540c\u65f6\u6210\u7acb&#xff0c;\u8fd9\u662f\u56e0\u4e3a\u5f53\u6211\u4eec\u521b\u5efa\u5b8c\u5b50\u8fdb\u7a0b\u540e&#xff0c;\u5176\u5b9e\u5df2\u7ecf\u5b58\u5728\u4e86\u4e24\u4e2a\u8fdb\u7a0b&#xff0c;\u4f1a\u5171\u7528fork\u4e4b\u540e\u7684\u4ee3\u7801&#xff0c;\u5bf9\u4e8e\u7236\u8fdb\u7a0b id &gt; 0&#xff0c;\u5bf9\u4e8e\u5b50\u8fdb\u7a0b id &#061;&#061; 0 &#xff0c;\u5728\u540c\u4e00\u65f6\u95f4\u5185\u4e24\u4e2a\u8fdb\u7a0b\u6267\u884c\u76f8\u540c\u4ee3\u7801\u7684\u4e0d\u540c\u90e8\u5206&#xff0c;\u5c31\u4f1a\u4ea7\u751f\u4e0a\u56fe\u7684\u7ed3\u679c\u3002<\/p>\n<h3>3.2 \u5173\u4e8efork\u7684\u95ee\u9898<\/h3>\n<li>\u4e3a\u4ec0\u4e48fork\u4f1a\u8fd4\u56de\u4e24\u4e2a\u503c&#xff1f;<\/li>\n<p>\u5728fork\u51fd\u6570\u5185\u90e8&#xff0c;\u6267\u884c\u5230\u6700\u540e\u7684return\u8bed\u53e5\u65f6&#xff0c;\u5b50\u8fdb\u7a0b\u5df2\u7ecf\u521b\u5efa\u597d\u4e86&#xff0c;\u4e24\u4e2a\u8fdb\u7a0b\u5c31\u4f1a\u540c\u65f6\u6267\u884creturn\u8bed\u53e5&#xff0c;fork\u5c31\u80fd\u8fd4\u56de\u4e24\u4e2a\u503c&#xff0c;\u6211\u4eec\u4ee5\u524d\u8ba4\u77e5\u7684\u4e00\u4e2a\u51fd\u6570\u53ea\u80fd\u6709\u4e00\u4e2a\u8fd4\u56de\u503c\u662f\u5728\u540c\u4e00\u4e2a\u8fdb\u7a0b\u7684\u6761\u4ef6\u4e0b\u624d\u6210\u7acb\u7684\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151604-689dfdb4839ff.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<li>\n<p>\u4e3a\u4ec0\u4e48 id &#061;&#061; 0 \u548c id &gt; 0 \u540c\u65f6\u6210\u7acb&#xff1f;<\/p>\n<ul>\n<li>\n<p>\u8fdb\u7a0b\u5177\u6709\u72ec\u7acb\u6027\u3002\u7236\u5b50\u8fdb\u7a0b\u4e0d\u540c\u7684PCB\u3001\u4ee3\u7801\u867d\u7136\u5171\u4eab&#xff0c;\u4f46\u662f\u53ea\u8bfb\u7684&#xff0c;\u4e0d\u4f1a\u5f71\u54cd\u72ec\u7acb\u6027<\/p>\n<\/li>\n<li>\n<p>\u7236\u8fdb\u7a0b\u548c\u5b50\u8fdb\u7a0b\u5171\u7528\u4ee3\u7801\u548c\u6570\u636e&#xff0c;\u5f53\u4efb\u610f\u8fdb\u7a0b\u5c1d\u8bd5\u4fee\u6539\u6570\u636e&#xff0c;\u64cd\u4f5c\u7cfb\u7edf\u5728\u6570\u636e\u88ab\u4fee\u6539\u524d\u62f7\u8d1d\u4e00\u4efd&#xff0c;\u8ba9\u76ee\u6807\u8fdb\u7a0b\u4fee\u6539\u8fd9\u4efd\u6570\u636e\u7684\u62f7\u8d1d\u3002\u901a\u8fc7\u8fd9\u79cd\u5199\u65f6\u62f7\u8d1d\u6280\u672f\u8ba9\u4e0d\u540c\u8fdb\u7a0b\u7684\u6570\u636e\u72ec\u7acb&#xff0c;\u4ece\u800c\u4fdd\u8bc1\u8fdb\u7a0b\u7684\u72ec\u7acb\u6027\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<p><font face=\"\u4eff\u5b8b\" color=\"#00CCFF\" size=\"4\">Have a good day&#x1f60f;<\/font><\/p>\n<p><font face=\"\u4eff\u5b8b\" color=\"#00CCFF\" size=\"4\">See you next time, guys!&#x1f601;\u2728&#x1f39e;<\/font><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151604-689dfdb4cc83b.png\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb10\u6b21\u3002\u8fdb\u7a0b\u662f\u64cd\u4f5c\u7cfb\u7edf\u8d44\u6e90\u7ba1\u7406\u7684\u6838\u5fc3\u5355\u4f4d\uff0c\u4ee3\u8868\u4e86\u7a0b\u5e8f\u7684\u6267\u884c\u5b9e\u4f8b\u3002\u901a\u8fc7\u7cfb\u7edf\u8c03\u7528\u5982fork\uff0c\u64cd\u4f5c\u7cfb\u7edf\u80fd\u591f\u521b\u5efa\u548c\u7ba1\u7406\u591a\u4e2a\u8fdb\u7a0b\uff0c\u4f7f\u5f97\u6bcf\u4e2a\u8fdb\u7a0b\u5728\u72ec\u7acb\u7684\u73af\u5883\u4e2d\u8fd0\u884c\uff0c\u786e\u4fdd\u8d44\u6e90\u7684\u9ad8\u6548\u5229\u7528\u3002<\/p>\n","protected":false},"author":2,"featured_media":56763,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,5915,5916,1714],"topic":[],"class_list":["post-56782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-5915","tag-5916","tag-1714"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010Linux\u7cfb\u7edf\u3011\u8fdb\u7a0b\u7684\u751f\u547d\u65c5\u7a0b\uff1a\u4ece\u521b\u5efa\u5230\u72ec\u7acb\u7684\u6f14\u7ece - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/56782.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Linux\u7cfb\u7edf\u3011\u8fdb\u7a0b\u7684\u751f\u547d\u65c5\u7a0b\uff1a\u4ece\u521b\u5efa\u5230\u72ec\u7acb\u7684\u6f14\u7ece - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb10\u6b21\u3002\u8fdb\u7a0b\u662f\u64cd\u4f5c\u7cfb\u7edf\u8d44\u6e90\u7ba1\u7406\u7684\u6838\u5fc3\u5355\u4f4d\uff0c\u4ee3\u8868\u4e86\u7a0b\u5e8f\u7684\u6267\u884c\u5b9e\u4f8b\u3002\u901a\u8fc7\u7cfb\u7edf\u8c03\u7528\u5982fork\uff0c\u64cd\u4f5c\u7cfb\u7edf\u80fd\u591f\u521b\u5efa\u548c\u7ba1\u7406\u591a\u4e2a\u8fdb\u7a0b\uff0c\u4f7f\u5f97\u6bcf\u4e2a\u8fdb\u7a0b\u5728\u72ec\u7acb\u7684\u73af\u5883\u4e2d\u8fd0\u884c\uff0c\u786e\u4fdd\u8d44\u6e90\u7684\u9ad8\u6548\u5229\u7528\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/56782.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-14T15:16:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151559-689dfdaf33ed2.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/56782.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/56782.html\",\"name\":\"\u3010Linux\u7cfb\u7edf\u3011\u8fdb\u7a0b\u7684\u751f\u547d\u65c5\u7a0b\uff1a\u4ece\u521b\u5efa\u5230\u72ec\u7acb\u7684\u6f14\u7ece - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-14T15:16:08+00:00\",\"dateModified\":\"2025-08-14T15:16:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/56782.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/56782.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/56782.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Linux\u7cfb\u7edf\u3011\u8fdb\u7a0b\u7684\u751f\u547d\u65c5\u7a0b\uff1a\u4ece\u521b\u5efa\u5230\u72ec\u7acb\u7684\u6f14\u7ece\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Linux\u7cfb\u7edf\u3011\u8fdb\u7a0b\u7684\u751f\u547d\u65c5\u7a0b\uff1a\u4ece\u521b\u5efa\u5230\u72ec\u7acb\u7684\u6f14\u7ece - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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":"https:\/\/www.wsisp.com\/helps\/56782.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010Linux\u7cfb\u7edf\u3011\u8fdb\u7a0b\u7684\u751f\u547d\u65c5\u7a0b\uff1a\u4ece\u521b\u5efa\u5230\u72ec\u7acb\u7684\u6f14\u7ece - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb10\u6b21\u3002\u8fdb\u7a0b\u662f\u64cd\u4f5c\u7cfb\u7edf\u8d44\u6e90\u7ba1\u7406\u7684\u6838\u5fc3\u5355\u4f4d\uff0c\u4ee3\u8868\u4e86\u7a0b\u5e8f\u7684\u6267\u884c\u5b9e\u4f8b\u3002\u901a\u8fc7\u7cfb\u7edf\u8c03\u7528\u5982fork\uff0c\u64cd\u4f5c\u7cfb\u7edf\u80fd\u591f\u521b\u5efa\u548c\u7ba1\u7406\u591a\u4e2a\u8fdb\u7a0b\uff0c\u4f7f\u5f97\u6bcf\u4e2a\u8fdb\u7a0b\u5728\u72ec\u7acb\u7684\u73af\u5883\u4e2d\u8fd0\u884c\uff0c\u786e\u4fdd\u8d44\u6e90\u7684\u9ad8\u6548\u5229\u7528\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/56782.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-14T15:16:08+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814151559-689dfdaf33ed2.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/56782.html","url":"https:\/\/www.wsisp.com\/helps\/56782.html","name":"\u3010Linux\u7cfb\u7edf\u3011\u8fdb\u7a0b\u7684\u751f\u547d\u65c5\u7a0b\uff1a\u4ece\u521b\u5efa\u5230\u72ec\u7acb\u7684\u6f14\u7ece - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-14T15:16:08+00:00","dateModified":"2025-08-14T15:16:08+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/56782.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/56782.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/56782.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010Linux\u7cfb\u7edf\u3011\u8fdb\u7a0b\u7684\u751f\u547d\u65c5\u7a0b\uff1a\u4ece\u521b\u5efa\u5230\u72ec\u7acb\u7684\u6f14\u7ece"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/56782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=56782"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/56782\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/56763"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=56782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=56782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=56782"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=56782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}