write()函数是C阻塞还是非阻塞?

时间:2017-02-24 23:29:16

标签: c linux posix

我查看了Linux手册页上的答案,但似乎无法找到它。我知道write()正在阻止,但我仍然不确定Alist of LaTeX classes and associated header and structure. If #+LATEX_CLASS is set in the buffer, use its value and the associated information. Here is the structure of each cell: (class-name header-string (numbered-section . unnumbered-section) ...) The header string ----------------- The HEADER-STRING is the header that will be inserted into the LaTeX file. It should contain the \documentclass macro, and anything else that is needed for this setup. To this header, the following commands will be added: - Calls to \usepackage for all packages mentioned in the variables ‘org-latex-default-packages-alist’ and ‘org-latex-packages-alist’. Thus, your header definitions should avoid to also request these packages. - Lines specified via "#+LATEX_HEADER:" and "#+LATEX_HEADER_EXTRA:" keywords. If you need more control about the sequence in which the header is built up, or if you want to exclude one of these building blocks for a particular class, you can use the following macro-like placeholders. [DEFAULT-PACKAGES] \usepackage statements for default packages [NO-DEFAULT-PACKAGES] do not include any of the default packages [PACKAGES] \usepackage statements for packages [NO-PACKAGES] do not include the packages [EXTRA] the stuff from #+LATEX_HEADER(_EXTRA) [NO-EXTRA] do not include #+LATEX_HEADER(_EXTRA) stuff So a header like \documentclass{article} [NO-DEFAULT-PACKAGES] [EXTRA] \providecommand{\alert}[1]{\textbf{#1}} [PACKAGES] will omit the default packages, and will include the #+LATEX_HEADER and #+LATEX_HEADER_EXTRA lines, then have a call to \providecommand, and then place \usepackage commands based on the content of ‘org-latex-packages-alist’. 。 有人能指出我的任何文件澄清吗?

1 个答案:

答案 0 :(得分:9)

read()上阅读POSIX write()。另请参阅open()pipe()等功能。

它取决于您正在读取或写入的文件描述符的属性(例如,思考O_NONBLOCK),以及基础文件类型(磁盘文件vs管道vs FIFO与套接字vs字符或阻止特殊),等等。

根据具体情况,read()write()都可以是阻止或非阻止。