有些应该软件为了确保正常运行,加入了操作系统版本号的检测.但是操作系统升级了,操作系统有没有应对之策呢?
有两个例子.第一个例子Linux 2.6.40 到 Linux 3.0(注意功能上没有大变化),有些程序检测是否为2.6.x,这样子的话没法运行,Andi Kleen has
implemented that
pretends the 3.0 change never happened. If a program is run under that
personality, it will think that the kernel version is 2.6.40; 3.1 will look
like 2.6.41, etc.
见
另外一个例子是Windows
"Microsoft Windows has, for a long time, had application compatibility
shims, small pieces of code which are injected into a process and
modify the behavior of some functions to fix compatibility problems.
The most common of them (as mentioned in passing on this blog post)
is the Version Lie shim. All it does is report a different operating
system version (AFAIK, there are several Version Lie shims, one for each
faked operating system version). It seems a lot of programs get it
wrong."
其实软件一升级问题就解决了,但是为了跑老软件,OS做出不完美的妥协.
阅读(812) | 评论(0) | 转发(0) |