POSIX是什么?我读过维基百科上的文章,每次遇到这个词我都会去读。事实上,我从来没有真正理解它是什么。

有没有人可以通过解释“POSIX的需求”来解释给我听?


当前回答

Posix更像是一个操作系统,它是一个“操作系统标准”。你可以把它想象成一个虚构的操作系统,它实际上并不存在,但它有一个文档。这些论文是由IEEE定义的“posix标准”,IEEE是美国的大型标准组织。 实现该规范的操作系统是“posix兼容的”。

政府法规在投资中更倾向于posix兼容的解决方案,因此posix兼容具有显著的财务优势,特别是对于美国的大型IT公司。

一个完全兼容posix的操作系统的回报是,它可以保证无缝地编译和运行所有兼容posix的应用程序。

Linux是最著名的。OSX、Solaris、NetBSD和Windows NT也可以在这里使用。Free和OpenBSD只是“几乎”兼容posix。WinNT的posix-compliance只是避免上述政府监管的伪解决方案。

其他回答

POSIX是一种操作系统标准,旨在使编写跨平台软件变得更容易。这在Unix世界中是一件特别重要的事情。

POSIX是:

POSIX(发音为/ pɒzɪks/)或 便携式操作系统接口 “1是一个家族的名字 的相关标准 IEEE定义应用程序 编程接口(API),沿 使用shell和实用程序接口 为软件兼容的变种 Unix操作系统,尽管 该标准适用于任何领域 操作系统。

基本上,它是一组措施,通过拥有(大部分)公共API和实用程序来减轻开发和使用不同UNIX风格的痛苦。有限的POSIX遵从性也扩展到各种版本的Windows。

Posix governs interoperability, portability, and in other areas such as the usage and mechanism of fork, permissions and filesystem standards such as /etc, /var, /usr and so on . Hence, when developers write a program under a Posix compliant system such as for example Linux, it is generally, not always, guaranteed to run on another posix compliant system such as IBM's AIX system or other commercial variants of Unix. Posix is a good thing to have as such it eases the software development for maximum portability which it strives for. Hope this answer makes sense.

感谢Jed Smith和Tinkertim指出我的错误——我的错!!:(

In 1985, individuals from companies throughout the computer industry joined together to develop the POSIX (Portable Operating System Interface for Computer Environments) standard, which is based largely on the UNIX System V Interface Definition (SVID) and other earlier standardization efforts. These efforts were spurred by the U.S. government, which needed a standard computing environment to minimize its training and procurement costs. Released in 1988, POSIX is a group of IEEE standards that define the API, shell, and utility interfaces for an operating system. Although aimed at UNIX-like systems, the standards can apply to any compatible operating system. Now that these stan- dards have gained acceptance, software developers are able to develop applications that run on all conforming versions of UNIX, Linux, and other operating systems.

摘自《Linux实用指南》

POSIX是IEEE和开放组织提出的一组标准,描述了理想的Unix如何运行。程序员、用户和管理员都可以熟悉POSIX文档,并期望POSIX投诉Unix提供所有提到的标准功能。

由于每个Unix的工作方式都略有不同——Solaris、Mac OS X、IRIX、BSD和Linux都有自己的怪癖——POSIX对业内人士特别有用,因为它定义了一个标准的操作环境。例如,C库中的大多数函数都基于POSIX;因此,程序员可以在他的应用程序中使用一个,并期望它在大多数unix中表现相同。

然而,Unix的不同领域通常是重点,而不是标准领域。

POSIX的伟大之处在于,欢迎您自己阅读:

开放组基础规范第7期

第7版被称为POSIX.1-2008,其中有新的东西——但是,POSIX.1的Google-fu等将允许您看到Unix背后的整个历史。