
{"id":2352,"date":"2010-08-06T21:16:16","date_gmt":"2010-08-06T15:46:16","guid":{"rendered":"http:\/\/www.jeffrin.in\/?p=2352"},"modified":"2010-08-06T21:16:16","modified_gmt":"2010-08-06T15:46:16","slug":"print-with-delay-0-5-process-independency","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/08\/06\/print-with-delay-0-5-process-independency\/","title":{"rendered":"Print With Delay 0.5 (process independency)"},"content":{"rendered":"<p><a href=\"https:\/\/beautifulworknew.wordpress.com\/wp-content\/uploads\/2021\/03\/aad78-processindependency1.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/beautifulworknew.wordpress.com\/wp-content\/uploads\/2021\/03\/aad78-processindependency1.png?w=300\" alt=\"\" title=\"processindependency\" width=\"300\" height=\"225\" class=\"alignnone size-medium wp-image-2354\" \/><\/a><br \/>\n<code><br \/>\n\/* Jeffrin Jose   Licensed GPL v3 Copyright August 2010<br \/>\nGPL --&gt; http:\/\/www.gnu.org\/copyleft\/gpl.html *\/<br \/>\n#include<br \/>\n#include<br \/>\n#include<br \/>\nint main()<br \/>\n{<br \/>\nint seconds;<br \/>\nint i=0,getptr;<br \/>\npid_t pid;<br \/>\nchar array[20]=\"Happy Friendship Day\";<br \/>\n\/* printf(\"n Happy Friendship Day n\"); *\/<br \/>\npid=fork();<br \/>\nif (pid == 0)<br \/>\n{<br \/>\nsetsid();<br \/>\nsetenv(\"PS1\",\"$\",1);<br \/>\n\/* getptr=getenv(\"PS1\");<br \/>\nprintf(\"%s\",getptr); *\/<br \/>\nprintf(\"\\n\");<br \/>\nfor(i=0;i&lt;20;i++)<br \/>\n{<br \/>\nprintf(&quot;%c&quot;,array[i]);<br \/>\n\/* for(seconds=0;seconds&lt;100000000;seconds++);*\/<br \/>\n\/* system(&quot;sleep 1s&quot;);*\/<br \/>\nfflush(stdout);<br \/>\nusleep(100000);<br \/>\n}<br \/>\nprintf(&quot;\\n&quot;);<br \/>\nfor(i=0;i&lt;20;i++)<br \/>\n{<br \/>\nprintf(&quot;%c&quot;,&#039;-&#039;);<br \/>\n\/* for(seconds=0;seconds&lt;100000000;seconds++);*\/<br \/>\n\/* system(&quot;sleep 1s&quot;);*\/<br \/>\nfflush(stdout);<br \/>\nusleep(100000);<br \/>\n}<br \/>\nprintf(&quot;\\n&quot;);<br \/>\n}<br \/>\n\/* printf(&quot;%d&quot;,pid); *\/<br \/>\nreturn 0;<br \/>\n}<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* Jeffrin Jose Licensed GPL v3 Copyright August 2010 GPL &#8211;&gt; http:\/\/www.gnu.org\/copyleft\/gpl.html *\/ #include #include #include int main() { int seconds; int i=0,getptr; pid_t pid; char array[20]=&#8221;Happy Friendship Day&#8221;; \/* printf(&#8220;n Happy Friendship Day n&#8221;); *\/ pid=fork(); if (pid == 0) { setsid(); setenv(&#8220;PS1&#8243;,&#8221;$&#8221;,1); \/* getptr=getenv(&#8220;PS1&#8221;); printf(&#8220;%s&#8221;,getptr); *\/ printf(&#8220;\\n&#8221;); for(i=0;i&lt;20;i++) { printf(&quot;%c&quot;,array[i]); \/* for(seconds=0;seconds&lt;100000000;seconds++);*\/ \/* &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/08\/06\/print-with-delay-0-5-process-independency\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Print With Delay 0.5 (process independency)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[615,645,931,1301,1435],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/2352"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=2352"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/2352\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=2352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=2352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=2352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}