A portability gotcha with accept()
Today's excitement came from trying to bring a local network daemonfrontend up and running on a FreeBSD machine. It would spawn programswhen you connected to it, but they always exited immediately afterthey printed their greeting banner; it was as if they were seeing animmediate end of file.
FreeBSD's ktrace revealed that when the spawned programs went toread from standard input, they got an EAGAIN result. Fortunately I'vestubbed my toe on this one before: this is the exact symptom of yourstandard
讀網誌
The economics of CPU performance
Recently, Intel and AMD have been telling everyone who would listenthat single CPU performance is more or less all tapped out, and thatfuture improvements would come from various multi-* developments;multi-core, multi-processor, and so on. Ominous pronouncements haveemerged about how programmers need to bite the bullet and move to(highly) concurrent programming if they want their gravy train tocontinue.
When reading this sort of news coverage, it's worthwhile to rememberwhat sells CPUs and software. Namely:
鏡住
許寶強﹕〈為何知識型經濟那麼反智〉
統計處最近發表了《香港——知識型經濟統計透視2005》,本地傳媒抽
Some words of wisdom for all ISPs
Vernon Schryver, in news.admin.net-abuse.email:
Spam complaints must be viewed like complaints from your neighborsthat your children or other pets have again wrecked gardens. Spamcomplaints are evidence of failures, and should be exceptionsinstead of part of the main anti-spam machinery.
(From Message-ID <95cqle $80v$1@calcite.rhyolite.com> .) One of the things I've learned the hard way in writing Unix programsis that you should almost never expect to know all of the errno valuesthat system calls can return. In theory it's documented in themanpages, but in practice a manpage's list is never comprehensive.The safest thing to do is to assume that any system call can returnalmost any errno value. The example I remember most vividly is that our SMTP server daemonused to carefully check the result of This week we received 12,785 email messages from 208 different IPaddresses. Our SMTP server handled 17,958 sessions from 984 differentIP addresses. Session volume is dramatically down from the levels of last week . Connection volume is also down: 122,600 connections from at least44,760 different IP addresses. However, we hit a highwater mark of 50connections being processed at once on Tuesday, so we have had This is one of those amusingly creative mistakes to see in action: Nameservers normally answer a query for a domain they
The danger of specific errno values
accept() . If
答留言.薦書
暉:
你說的話我並不完全反對。確然很多人都將韓農想像成受難者,好像他們不是受難者,或者有更苦的受難者,韓農就不值得支持。不過,我認為你也是抱持這種邏輯的人。否則,你發現中國農民比韓國農民更慘,那
到了深夜,仍然有人會令我食慾不振
Weekly spam summary on January 14th, 2006
How not to set up your DNS (part 8)
Menu