[問題] 執行exit()後,關於系統所執行的fflush()
環境:freebsd、g++
http://nopaste.csie.org/fce07
原本程式
http://nopaste.csie.org/da49a
dll
輸出:
pid:94163 stdin:14194208 stdout:14194512 stderr:14194816
pid:94163 14194512
pid:94163 14194816
pid:94163 14194816
pid:94163 14194512
pid:94163 14194816
pid:94163 14194816
利用LD_PRELOAD覆蓋原本的fflush()
看總共執行了幾次fflush()
雖然有關閉stdout跟stderr的動作
但不懂的是為何執行了6次那麼多
如果說關的是不同的stream也就算了
可是這裡關的只有stdout跟stderr
--
C++ hello world標準寫法
http://nopaste.csie.org/fee97
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.134.226.149
推
06/06 01:55, , 1F
06/06 01:55, 1F
→
06/06 01:56, , 2F
06/06 01:56, 2F
推
06/06 09:48, , 3F
06/06 09:48, 3F
→
06/06 14:04, , 4F
06/06 14:04, 4F