{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoyota-hino.hatenablog.com%2Fentry%2F2023%2F05%2F03%2F160454\" title=\"Linux\u306e\u30d7\u30ed\u30bb\u30b9\u751f\u6210fork\u3068execl\u306e\u9055\u3044 - \u5e95\u8fbaSE\u306e\u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"\u5e95\u8fbaSE\u306e\u5099\u5fd8\u9332","height":"190","type":"rich","provider_url":"https://hatena.blog","image_url":null,"title":"Linux\u306e\u30d7\u30ed\u30bb\u30b9\u751f\u6210fork\u3068execl\u306e\u9055\u3044","published":"2023-05-03 16:04:54","description":"fork\u95a2\u6570\u306f\u547c\u3073\u51fa\u3057\u305f\u30d7\u30ed\u30bb\u30b9\u306e\u30b3\u30d4\u30fc\u30d7\u30ed\u30bb\u30b9\u3092\u4f5c\u6210\u3059\u308b \u78ba\u8a8d\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0 #include <stdio.h> #include <unistd.h> int main(void){ pid_t pid; int i; printf(\"start\\n\"); fork(); pid=getpid(); for(i=0;i<5;i++){ printf(\"pid=%d i=%d\\n\",pid,i); } } \u5b9f\u884c\u7d50\u679c start pid=6438 i=0 pid=6438 i=1 pid=6438 i=2 pid=6438 i=3 pid=6438 i=4 pid=6439 i=0 pid=\u2026","url":"https://toyota-hino.hatenablog.com/entry/2023/05/03/160454","width":"100%","blog_url":"https://toyota-hino.hatenablog.com/","author_name":"toyota-hino","categories":[],"provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/toyota-hino/","version":"1.0"}