在寫計網作業時,發現如果用 signal(2) 去 override default signal handler,當 accept(2) block 住時,接到了那個 signal,並不會 return 回來。這跟平常沒 override 時,會傳回 -1 並將 errno 設為 EINTR 的情形不同。翻了 > 才發現原因。
在 accept, read 這類的 /slow system call/ 裡面接到 signal 後,當 signal handler return 時,傳回 EINTR。``有些''系統會重新回到該 system call 執行 (現在的 Linux & FreeBSD 都是),我在想也是因為這個原因,我的 accept 不會 return。
後來,我用 sigaction(2) 取代 signal(2),sa_flags 不要設 SA_RESTART,就可以如我所願讓 blocked 的 accept 回來了。這個方法在 Linux 跟 FreeBSD 下都 work。
2005年4月2日 星期六
2005年3月25日 星期五
Submit Blosxom's Plugins
昨天送了兩個 plugin 到 The Unofficial Blosxom User Group,結果剛才發現在 V3 的 plugin list 裡面占了前兩個位置 orz 這該說是名字取得好嗎 XD
2005年3月22日 星期二
BlosxomCache for Blosxom 3.0
Since Blosxom 3.0 do not have static rendering so far, I wrote a plugin called BlosxomCache for speeding up Blosxom.
It works as /cache/. User's request will be cached so that the same page won't be needed to regenerate every time. Users will not see the dirty page use this plugin. The more plugin you use, the more CPU you save in your box!
Note that the database entries are not going to be deleted, so you might want to delete the database on the first day of each month (But it's harmless if you don't do it unless your disk is full).
Get BlosxomCache.
It works as /cache/. User's request will be cached so that the same page won't be needed to regenerate every time. Users will not see the dirty page use this plugin. The more plugin you use, the more CPU you save in your box!
Note that the database entries are not going to be deleted, so you might want to delete the database on the first day of each month (But it's harmless if you don't do it unless your disk is full).
Get BlosxomCache.
2005年3月20日 星期日
AutoRef.pm
2005年3月19日 星期六
Fontconfig 2.3.1
upgrade 到 Fontconfig 2.3.1 後,很多地方的英文字型會變成兩倍寬。花了不少時間,終於找到問題了。遠在天邊,近在眼前,找到這個網頁,再對照 eric 的 fontconfig 文件,才知道原來問題就跟細明體一樣。
文鼎的字型有這個問題,不過調 globaladvance 沒有用,所以我在 .fonts.conf 中加入這段:
mailing list 上這篇文章列出了一些有問題的亞洲字型,還有一個待解決的問題 ...
http://lists.freedesktop.org/archives/fontconfig/2005-March/001250.html
http://lists.freedesktop.org/archives/fontconfig/2005-March/001251.html
文鼎的字型有這個問題,不過調 globaladvance 沒有用,所以我在 .fonts.conf 中加入這段:
AR PL
0
mailing list 上這篇文章列出了一些有問題的亞洲字型,還有一個待解決的問題 ...
http://lists.freedesktop.org/archives/fontconfig/2005-March/001250.html
http://lists.freedesktop.org/archives/fontconfig/2005-March/001251.html
2005年3月17日 星期四
系統實驗/Ubicomp Idea
- 3D model maker
- 掃描指定的物品,建出 3D model
- 掃描指定的物品,建出 3D model
- 實體書本字串搜尋
- 就像平常讀電子書的 Ctrl-F,但這是實體的 :D
- 就像平常讀電子書的 Ctrl-F,但這是實體的 :D
- Graphical based tracking/identification system
- 在一個房間內 track 指定的物品
- 在一個房間內 track 指定的物品
- 人工水晶體
- 給水晶體受傷的人
- 給水晶體受傷的人
- 隱形眼鏡搜尋器
- 掉隱形眼鏡時很有用 XD
- 掉隱形眼鏡時很有用 XD
訂閱:
文章 (Atom)