Linux newbie: Linux vs POSIX manual

こ雲淡風輕ζ 提交于 2021-02-07 18:47:48

问题


$ apropos mkfifo
mkfifo (1)           - make FIFOs (named pipes)
mkfifo (1posix)      - make FIFO special files
mkfifo (3)           - make a FIFO special file (a named pipe)
mkfifo (3posix)      - make a FIFO special file
mkfifoat (3)         - make a FIFO (named pipe) relative to a directory file ...

So I have man pages for Linux Programmer’s Manual and POSIX Programmer’s Manual. Which should I prefer and why? (I'm writing a Linux application, no plans to port it AIX, BSD etc)

Thanks.


回答1:


Basically, the linux manuals are documentation of the commands/APIs from their writers; The POSIX manuals are from the POSIX standard. Usually, the "normal" ones are shorter and terser, but deal with the specific implementation; the POSIX ones are longer and more detailed (see man 3p read), but only tell what is in the standard.

The best is to look in both.




回答2:


no plans to port it [to] AIX, BSD etc.

Famous last words :-) This might change quickly before your resume grows too much longer.

To answer the question, the Linux Documentation Project once asked the Opengroup (who is responsible for issuing the POSIX Standard) if they may use their wording as found in the official standard. The request was granted for issue 7, current at the time (~2011).

The non-POSIX qualified man pages will usually describe more and different options. Developers seeking to write portable programs should refer to the POSIX man pages, though. Here's the POSIX Standard (issue 7) on the web.



来源:https://stackoverflow.com/questions/479173/linux-newbie-linux-vs-posix-manual

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!