{"id":2340,"date":"2021-02-08T16:35:44","date_gmt":"2021-02-08T11:05:44","guid":{"rendered":"https:\/\/binaryterms.com\/?p=2340"},"modified":"2021-02-08T16:41:05","modified_gmt":"2021-02-08T11:11:05","slug":"difference-between-fork-and-exec-system-call","status":"publish","type":"post","link":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html","title":{"rendered":"Difference Between fork() and exec() System Call"},"content":{"rendered":"<p>The fork() and exec() are the system calls that are used for controlling processes. Both are used to create a new process where the process is the program in execution. The fork() system call when invoked by any process creates a new duplicate child process of the invoking process.<\/p>\n<p>However, the exec() system call when invoked by any process replaces the invoking process along with all its threads by the process specified to it in its parameter.<\/p>\n<p>In the section ahead we will discuss a few more differences between fork() and exec(). Along with that, we will also discuss both the terms separately in order to get a brief idea of both the system calls.<\/p>\n<h2>Content: fork() Vs exec() System Call<\/h2>\n<ol>\n<li><a href=\"#DifferenceChart\">Difference Chart<\/a><\/li>\n<li><a href=\"#Whatisthefork()SystemCall?\">What is the fork() System Call?<\/a><\/li>\n<li><a href=\"#Whatisexec()SystemCall?\">What is exec() System Call?<\/a><\/li>\n<li><a href=\"#KeyTakeaways\">Key Takeaways<\/a><\/li>\n<li><a href=\"#Conclusion\">Conclusion<\/a><\/li>\n<\/ol>\n<p><a name=\"DifferenceChart\"><\/a><\/p>\n<h3>Difference Chart<\/h3>\n<p>\n<table id=\"tablepress-10\" class=\"tablepress tablepress-id-10\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Factors for Differentiation<\/th><th class=\"column-2\">fork()<\/th><th class=\"column-3\">exec()<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">Invoking<\/td><td class=\"column-2\">fork() creates a new duplicate child process of the process that invoked fork()<\/td><td class=\"column-3\">exec() replaces a process that invokes it with a new process provided in its parameter.<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">Process id<\/td><td class=\"column-2\">The child process and parent process have unique process id.\u00a0<\/td><td class=\"column-3\">The new process and the replaced process have the same process id.<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">Execution<\/td><td class=\"column-2\">The parent and child process start simultaneous execution from the instruction just after fork().<\/td><td class=\"column-3\">The currently running process is terminated and the exec() start execution of the new process from its entry point.<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">Arguments<\/td><td class=\"column-2\">No arguments are passed to fork() system call.<\/td><td class=\"column-3\">Basically, three or more arguments are passed to the exec() system call.<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">Format<\/td><td class=\"column-2\">Pid=fork();<\/td><td class=\"column-3\">exec(cont char *filename, char* const argv[], char* const envp[])<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-10 from cache --><br \/>\n<a name=\"Whatisthefork()SystemCall?\"><\/a><\/p>\n<h3>What is the fork() System Call?<\/h3>\n<p>The fork() system call is a process controlling system call. The fork() system call when invoked by any process creates a separate new process which is a duplicate of the process invoking the fork() system call. However, the process invoking the fork() system call is termed as the <strong>parent process<\/strong> and the new duplicate process created by the fork() is termed to as a <strong>child process<\/strong>.<\/p>\n<p>After fork() creates a duplicate child process both the parent and child process resumes their execution from the next instruction after fork() simultaneously. Both the parent process and child process have their unique process id. we can illustrate this with the help of an example below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2349\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg\" alt=\"fork() system call\" width=\"430\" height=\"280\" srcset=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg 430w, https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call-300x195.jpg 300w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" \/><\/p>\n<p>As soon as the fork() is executed one child process is created that is duplicate of the parent process. Now, both parent and child process will execute the printf() statement simultaneously. Where once the parent process id will get printed and once the child process id will get printed.<\/p>\n<p>If the fork has successfully created a child then the value its return would be 0 and if the fork() execution failed then it returns a negative value. For the parent process, fork() returns the process identifier of its child process.<\/p>\n<p>To understand the working of fork() system call observe the code below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">main(){\r\n\r\nfork();\r\n\r\nprintf(\u201c\\n hello world\u201d);\r\n\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2347\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-and-exec.jpg\" alt=\"fork() and exec()\" width=\"298\" height=\"196\" \/><\/p>\n<p>In the figure above you can see that as soon as the process P<sub>1<\/sub> invokes the fork() instruction a child process CP<sub>1<\/sub> is created and both child and parent process resume their execution from the next instruction after fork(). So we can see that the \u2018printf()\u2019 statement after fork() instruction is being executed two times once by the parent process and once by the child process.<\/p>\n<p>Now what if we have fork() instruction is two times in the code above i.e.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">main(){\r\n\r\nfork();\r\n\r\nfork();\r\n\r\nprintf(\u201c\\n hello world\u201d);\r\n\r\n}<\/pre>\n<p>In this case, execution would take place in this manner.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2348\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-2.jpg\" alt=\"fork 2\" width=\"600\" height=\"313\" srcset=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-2.jpg 600w, https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-2-300x157.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>So, seeing the number of fork() system calls in the code you can calculate the number of child processes that would be created by calculating <strong>2<sup>n<\/sup>-1<\/strong>, where n is the number of fork() system call in the code.<br \/>\n<a name=\"Whatisexec()SystemCall?\"><\/a><\/p>\n<h3>What is exec() System Call?<\/h3>\n<p>Typically exec() system call is used to replace the currently executing process along with all its threads with the program provided to it in its parameter. The exec() system call is generally invoked after the fork() system call, either by parent or by the child process.<\/p>\n<p>There are most of the cases where the child needs to execute the different program like that of the parent. So, by invoking the exec() system call a new program starts its execution in the context of the existing program.<\/p>\n<p>Now, consider we have two program files prog1 and prog2. We will start executing prog1 and we will see how we can use exec() system call to replace the prog1 with prog2. Below you have the code for prog1.c.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2350\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/exec1.jpg\" alt=\"exec1()\" width=\"599\" height=\"261\" srcset=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/exec1.jpg 599w, https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/exec1-300x131.jpg 300w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/p>\n<p>The figure below shows the code for prog2.c.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2351\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/exec2.jpg\" alt=\"exec2()\" width=\"553\" height=\"177\" srcset=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/exec2.jpg 553w, https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/exec2-300x96.jpg 300w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/p>\n<p>On executing prog1.c we get the result as you can see below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2352\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/exec.jpg\" alt=\"exec()\" width=\"405\" height=\"144\" srcset=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/exec.jpg 405w, https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/exec-300x107.jpg 300w\" sizes=\"auto, (max-width: 405px) 100vw, 405px\" \/><\/p>\n<p>You can notice that the control of the program has not gone back to prog1.c after the execution of exec(). The only condition where the program control goes back to the invoking program is an error in the execution of exec().<\/p>\n<p>The process invoking exec() must provide the environment for the new program. Like the name of the file or program to be executed, a pointer to the argument array, and finally a pointer to the environment array.<\/p>\n<p>There are few versions of exec() system call including execl, execv, execle, and execve, that allow the parameters to be omitted or specified in various other ways.<br \/>\n<a name=\"KeyTakeaways\"><\/a><\/p>\n<div id=\"keytake\">\n<h3>Key Takeaways<\/h3>\n<ul>\n<li>Both fork() and exec() being the system call to create a new process are different in a way that the fork() system call is used to create a new duplicate process of the process that invoked the fork() system call. However, the exec() replaces the memory space of the invoking process by a new process.<\/li>\n<li>In case of fork() system call both the invoking process i.e. parent process and the newly created process i.e. the child process has a different process identifier. Although in the case of exec() the invoking process and the newly created process that has replaced the invoking process shares the same process identifier as the newly created process is executed in the context of the invoking process.<\/li>\n<li>Once the fork() creates a child to a parent process both starts there execution simultaneously after the fork() instruction. On the other hand, once the exec() replaces the existing process by a new process, only the new process is in execution and control never goes back to the original process until there is an error in the execution of exec().<\/li>\n<li>No arguments are supplied to the fork() system call whereas the exec() system call has three basic parameters file name, point to argument array, a pointer to environment array.<\/li>\n<\/ul>\n<\/div>\n<p><a name=\"Conclusion\"><\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>So, we have discussed both fork() and exec() system call where both are used to create a new process in the system and we have also discussed how do they differ from each other in various ways. You can make use of exec() system call after the execution of fork() system call just to make parent and child process to go their separate way.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The fork() and exec() are the system calls that are used for controlling processes. Both are used to create a new process where the process is the program in execution. The fork() system call when invoked by any process creates a new duplicate child process of the invoking process. However, the exec() system call when [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[2],"tags":[],"class_list":{"0":"post-2340","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-operating-system","7":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Difference Between fork() and exec() System Call? - Binary Terms<\/title>\n<meta name=\"description\" content=\"The fork() and exec() are the system calls that are used for process control. Both are used to create a new process where the process is the program in execution.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Difference Between fork() and exec() System Call? - Binary Terms\" \/>\n<meta property=\"og:description\" content=\"The fork() and exec() are the system calls that are used for process control. Both are used to create a new process where the process is the program in execution.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html\" \/>\n<meta property=\"og:site_name\" content=\"Binary Terms\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-08T11:05:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-08T11:11:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg\" \/>\n<meta name=\"author\" content=\"Neha T\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Neha T\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#article\",\"isPartOf\":{\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html\"},\"author\":{\"name\":\"Neha T\",\"@id\":\"https:\/\/binaryterms.com\/#\/schema\/person\/e495f1d57f5c0a4c521cc3dba95661fe\"},\"headline\":\"Difference Between fork() and exec() System Call\",\"datePublished\":\"2021-02-08T11:05:44+00:00\",\"dateModified\":\"2021-02-08T11:11:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html\"},\"wordCount\":1037,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/binaryterms.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#primaryimage\"},\"thumbnailUrl\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg\",\"articleSection\":[\"Operating System\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html\",\"url\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html\",\"name\":\"Difference Between fork() and exec() System Call? - Binary Terms\",\"isPartOf\":{\"@id\":\"https:\/\/binaryterms.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#primaryimage\"},\"image\":{\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#primaryimage\"},\"thumbnailUrl\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg\",\"datePublished\":\"2021-02-08T11:05:44+00:00\",\"dateModified\":\"2021-02-08T11:11:05+00:00\",\"description\":\"The fork() and exec() are the system calls that are used for process control. Both are used to create a new process where the process is the program in execution.\",\"breadcrumb\":{\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#primaryimage\",\"url\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg\",\"contentUrl\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg\",\"width\":430,\"height\":280,\"caption\":\"fork() system call\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/binaryterms.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Difference Between fork() and exec() System Call\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/binaryterms.com\/#website\",\"url\":\"https:\/\/binaryterms.com\/\",\"name\":\"Binary Terms\",\"description\":\"The Computer Science &amp; IT Guide\",\"publisher\":{\"@id\":\"https:\/\/binaryterms.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/binaryterms.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/binaryterms.com\/#organization\",\"name\":\"Binary Terms\",\"url\":\"https:\/\/binaryterms.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/binaryterms.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2020\/05\/binary-terms-logo1.png\",\"contentUrl\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2020\/05\/binary-terms-logo1.png\",\"width\":400,\"height\":63,\"caption\":\"Binary Terms\"},\"image\":{\"@id\":\"https:\/\/binaryterms.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/binaryterms.com\/#\/schema\/person\/e495f1d57f5c0a4c521cc3dba95661fe\",\"name\":\"Neha T\",\"url\":\"https:\/\/binaryterms.com\/author\/author\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Difference Between fork() and exec() System Call? - Binary Terms","description":"The fork() and exec() are the system calls that are used for process control. Both are used to create a new process where the process is the program in execution.","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:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html","og_locale":"en_GB","og_type":"article","og_title":"Difference Between fork() and exec() System Call? - Binary Terms","og_description":"The fork() and exec() are the system calls that are used for process control. Both are used to create a new process where the process is the program in execution.","og_url":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html","og_site_name":"Binary Terms","article_published_time":"2021-02-08T11:05:44+00:00","article_modified_time":"2021-02-08T11:11:05+00:00","og_image":[{"url":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg","type":"","width":"","height":""}],"author":"Neha T","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Neha T","Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#article","isPartOf":{"@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html"},"author":{"name":"Neha T","@id":"https:\/\/binaryterms.com\/#\/schema\/person\/e495f1d57f5c0a4c521cc3dba95661fe"},"headline":"Difference Between fork() and exec() System Call","datePublished":"2021-02-08T11:05:44+00:00","dateModified":"2021-02-08T11:11:05+00:00","mainEntityOfPage":{"@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html"},"wordCount":1037,"commentCount":0,"publisher":{"@id":"https:\/\/binaryterms.com\/#organization"},"image":{"@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#primaryimage"},"thumbnailUrl":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg","articleSection":["Operating System"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html","url":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html","name":"Difference Between fork() and exec() System Call? - Binary Terms","isPartOf":{"@id":"https:\/\/binaryterms.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#primaryimage"},"image":{"@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#primaryimage"},"thumbnailUrl":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg","datePublished":"2021-02-08T11:05:44+00:00","dateModified":"2021-02-08T11:11:05+00:00","description":"The fork() and exec() are the system calls that are used for process control. Both are used to create a new process where the process is the program in execution.","breadcrumb":{"@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#primaryimage","url":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg","contentUrl":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/02\/fork-system-call.jpg","width":430,"height":280,"caption":"fork() system call"},{"@type":"BreadcrumbList","@id":"https:\/\/binaryterms.com\/difference-between-fork-and-exec-system-call.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/binaryterms.com\/"},{"@type":"ListItem","position":2,"name":"Difference Between fork() and exec() System Call"}]},{"@type":"WebSite","@id":"https:\/\/binaryterms.com\/#website","url":"https:\/\/binaryterms.com\/","name":"Binary Terms","description":"The Computer Science &amp; IT Guide","publisher":{"@id":"https:\/\/binaryterms.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/binaryterms.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/binaryterms.com\/#organization","name":"Binary Terms","url":"https:\/\/binaryterms.com\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/binaryterms.com\/#\/schema\/logo\/image\/","url":"https:\/\/binaryterms.com\/wp-content\/uploads\/2020\/05\/binary-terms-logo1.png","contentUrl":"https:\/\/binaryterms.com\/wp-content\/uploads\/2020\/05\/binary-terms-logo1.png","width":400,"height":63,"caption":"Binary Terms"},"image":{"@id":"https:\/\/binaryterms.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/binaryterms.com\/#\/schema\/person\/e495f1d57f5c0a4c521cc3dba95661fe","name":"Neha T","url":"https:\/\/binaryterms.com\/author\/author"}]}},"_links":{"self":[{"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/posts\/2340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/comments?post=2340"}],"version-history":[{"count":6,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/posts\/2340\/revisions"}],"predecessor-version":[{"id":2356,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/posts\/2340\/revisions\/2356"}],"wp:attachment":[{"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/media?parent=2340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/categories?post=2340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/tags?post=2340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}