{"id":1054,"date":"2013-04-21T05:29:19","date_gmt":"2013-04-20T19:29:19","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1054"},"modified":"2020-04-08T13:43:33","modified_gmt":"2020-04-08T03:43:33","slug":"c-child-process-for-linux-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/c-child-process-for-linux-tutorial\/","title":{"rendered":"C Child Process for Linux Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/C\/fork\/C_ChildProcess_Spawn.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"C Child Process for Linux or Windows Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/C\/fork\/C_ChildProcess_Spawn.jpg\" title=\"C Child Process for Linux or Windows Tutorial\"  \/><\/a><p class=\"wp-caption-text\">C Child Process for Linux or Windows Tutorial<\/p><\/div>\n<p>Think Linux, think C &#8230; think Command Line &#8230; one command follows another &#8230; boring! &#8230; well, this tutorial might start you thinking otherwise &#8230; it illustrates a process spawning technique via the C family functions including execv &#8230; maybe study it and for afters study <a target=_blank title='background processing' href='http:\/\/www.unix.com\/unix-advanced-expert-users\/42558-nohup-background-process.html'>nohup<\/a> and <a target=_blank title='nice' href='http:\/\/linux.about.com\/library\/cmd\/blcmdl1_nice.htm'>nice<\/a> and the use of <a target=_blank title='background processing' href='http:\/\/www.unix.com\/unix-advanced-expert-users\/42558-nohup-background-process.html'>&#038;<\/a> for background processing.<\/p>\n<p>Background reading for tutorial:<\/p>\n<ul>\n<li><a target=_blank title='fork' href='http:\/\/linux.die.net\/man\/2\/fork'>fork<\/a><\/li>\n<li><a target=_blank title='execv' href='http:\/\/linux.about.com\/library\/cmd\/blcmdl3_execv.htm'>execv<\/a><\/li>\n<li><a target=_blank title='which' href='http:\/\/linux.about.com\/library\/cmd\/blcmdl1_which.htm'>which<\/a><\/li>\n<li><a target=_blank title='wait' href='http:\/\/linux.die.net\/man\/2\/wait'>wait<\/a><\/li>\n<\/ul>\n<p>Here is a tutorial that introduces you to some C programming code for spawning a child process in Linux &#8230;<\/p>\n<p>Let&#8217;s see some <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/C\/fork\/C_ChildProcess_Spawn.jpg'>C via XCode<\/a> for this &#8230;<\/p>\n<p>Link to some downloadable code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/C\/fork\/main.cpp_GETME' title='Download me'>main.cpp<\/a>  (or main.c &#8230; see how XCode can do C as well!) for use.\n<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d1054' onclick='var dv=document.getElementById(\"d1054\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=main.c\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d1054' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Think Linux, think C &#8230; think Command Line &#8230; one command follows another &#8230; boring! &#8230; well, this tutorial might start you thinking otherwise &#8230; it illustrates a process spawning technique via the C family functions including execv &#8230; maybe &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/c-child-process-for-linux-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37,40],"tags":[234,707,885,997,1319],"class_list":["post-1054","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","category-xcode","tag-command-line","tag-linux","tag-operating-system-2","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/1054"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=1054"}],"version-history":[{"count":1,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/1054\/revisions"}],"predecessor-version":[{"id":48526,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/1054\/revisions\/48526"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=1054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=1054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=1054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}