<aside> ๐ก File Descriptor
</aside>
ํ์ผ์ด๋ ๋๋ ํ ๋ฆฌ๋ฅผ ์ด๊ธฐ ์ํด ์ฌ์ฉ
<sys/fcntl.h> ํค๋์ ํฌํจ๋จ.
Example 1
x = open("/aa/bb", O_RDWR, 00777);
Example 2
char fname[20];
strcpy(fname,"/aa/bb");
x = open(fname, O_RDWR, 00777);
7
(111): ์ฝ๊ธฐ/์ฐ๊ธฐ/์คํ ๊ถํ6
(110): ์ฝ๊ธฐ/์ฐ๊ธฐ ๊ถํ5
(101): ์ฝ๊ธฐ/์คํ ๊ถํ4
(100): ์ฝ๊ธฐ ๊ถํ3
(011): ์ฐ๊ธฐ/์คํ ๊ถํ2
(010): ์ฐ๊ธฐ ๊ถํ1
(001): ์คํ ๊ถํ0
(000): ๊ถํ ์์