繁体   English   中英

signal(7)和signal(2)有什么区别?

[英]What is the difference between signal(7) and signal(2)?

**公开 -我是一位C语言初学者,不完全熟悉如何解释手册页,也不了解有关C语言的正确单词选择-请对此问题进行任何编辑或澄清。

问题:我正在阅读signal(7)的手册页,通常会看到对signal(2)的引用。

如果我说“ signal(7)”而不是“ signal(2)”,那么对信号的引用有何不同? 这与7是库调用而2是系统调用有关吗?

signal(7)是信号处理概述。
http://man7.org/linux/man-pages/man7/signal.7.html

signal(2)是API函数(系统调用)。
http://man7.org/linux/man-pages/man2/signal.2.html

无论如何,这是手册页的部分概述: http : //linux.die.net/man

1 user commands (introduction)
2 system calls (introduction)
3 library functions (introduction)
4 special files (introduction)
5 file formats (introduction)
6 games (introduction)
7 conventions and miscellany (introduction)
8 administration and privileged commands (introduction)
L math library functions
N tcl functions 

好吧,signal()取决于系统,它取决于您的OS。 如此处所引用:

   The behavior of signal() varies across UNIX versions, and has also
   varied historically across different versions of Linux.  Avoid its
   use: use sigaction(2) instead.  See Portability below.

SRC

linux上的signal(2) 访问该手册,但是

信号概述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM