
{"id":7615,"date":"2012-09-09T15:40:22","date_gmt":"2012-09-09T15:40:22","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=7615"},"modified":"2012-09-09T15:40:22","modified_gmt":"2012-09-09T15:40:22","slug":"open-system-call","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2012\/09\/09\/open-system-call\/","title":{"rendered":"open( ) system call"},"content":{"rendered":"<h4><u>commandline session<\/u><\/h4>\n<pre>\n$ 4.2.36 50 548---&gt; cat test-open.c\n#include \n#include \n#include \n\nmain()\n{\nint fd;\nfd = open( \"text\" , O_CREAT);\n}\n$ 4.2.36 51 549---&gt; gcc test-open.c\n$ 4.2.36 52 550---&gt; .\/a.out\n$ 4.2.36 53 551---&gt; ls\na.out  test-open.c  text\n$ 4.2.36 54 552---&gt; cat text\ncat: text: Permission denied\n$ 4.2.36 55 553---&gt; ls -l  text\n---S--s--T 1 jeffrin jeffrin 0 Sep  9 20:56 text\n$ 4.2.36 56 554---&gt; sudo cat text\n[sudo] password for jeffrin:\n$ 4.2.36 57 555---&gt; umask -S\nu=rwx,g=rx,o=rx\n$ 4.2.36 58 556---&gt; vi test-open.c\n$ 4.2.36 59 557---&gt; gcc test-open.c\n$ 4.2.36 60 558---&gt; .\/a.out\n$ 4.2.36 61 559---&gt; ls -l  text\n---S--s--T 1 jeffrin jeffrin 0 Sep  9 20:56 text\n$ 4.2.36 62 560---&gt;\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>commandline session $ 4.2.36 50 548&#8212;&gt; cat test-open.c #include #include #include main() { int fd; fd = open( &#8220;text&#8221; , O_CREAT); } $ 4.2.36 51 549&#8212;&gt; gcc test-open.c $ 4.2.36 52 550&#8212;&gt; .\/a.out $ 4.2.36 53 551&#8212;&gt; ls a.out test-open.c text $ 4.2.36 54 552&#8212;&gt; cat text cat: text: Permission denied $ 4.2.36 55 553&#8212;&gt; &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2012\/09\/09\/open-system-call\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;open( ) system call&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/7615"}],"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=7615"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/7615\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=7615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=7615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=7615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}