Changes between Version 2 and Version 3 of wade/linuxProgramming


Ignore:
Timestamp:
Jan 9, 2009, 5:28:02 PM (15 years ago)
Author:
wade
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • wade/linuxProgramming

    v2 v3  
    2727   man 1 printf
    2828}}}
     29
     30== File Descriptors ==
     31可以想成他只是一個 index ,負責檔案的開啟與關閉,是一個 C type int。
     321. 特殊的 FD:
     33|| FD || Name || 功能描述||
     34|| 0 || Standard Input (stdin) || 標準輸入,如 keyboard ||
     35|| 1 || Standard Output (stdout) || 標準輸出,如 monitor ||
     36|| 2 || Standard Error (stderr) || 標準錯誤,特殊輸出 ||
     37
     38== Pipe ==
     39read() 會被 block 住,所以不用擔心 parent 會比 child 先結束,而導致 child 也跟著結束 (因為 child process 是依附著 parent process 而存在,依存關係可透過 pstree 查詢)。
     40
    2941== Reference ==
    30  * [http://angkor.jazzbear.idv.tw/Linux_DivX/ Jazz 教學檔案]
     42 * [http://angkor.jazzbear.idv.tw/Linux_DivX/ Jazz 教學檔案]。
     43 * [http://en.wikipedia.org/wiki/File_descriptor]