Skip to Content
C语言核心技术(原书第2版)
book

C语言核心技术(原书第2版)

by Peter Prinz, Tony Crawford
August 2017
Intermediate to advanced
798 pages
17h 44m
Chinese
China Machine Press
Content preview from C语言核心技术(原书第2版)
标准库函数
|
563
标准库
函数
的信号。这里所列举的宏可以作为函数
signal()
中整型参数
sig
的合法值。当信号发生
时,这里列举的信号也可以作为参数传入安装的信号处理器中。
SIGFPE
浮点异常(
floating-point exception
):程序尝试执行一个非法的算术运算,例如除
以零,或者引起一个错误,例如上溢。
SIGILL
非法命令(
illegal instruction
):程序流包含无效的机器码。
SIGSEGV
违反分段限制(
segmentation violation
):程序尝试执行一个非法的内存访问操作。
SIGABRT
放弃(
abort
):程序意外结束(请参见本章的
abort()
)。
SIGINT
中断(
interrupt
):用户利用
Ctrl+C
或者类似的事件,以交互式地中断程序。
SIGTERM
结束(
termination
):通过命令终止程序。
某些特定系统可能会定义其他信号类型,以及针对这些其他信号类型
handler
值的宏。
而且,许多系统不允许程序针对特定信号自行安装信号处理器,或者忽略这些特定信
号。例如,
Unix
系统不允许程序处理或忽略
SIGKILL
或
SIGSTOP
信号。上述列表中前三种
信号
SIGFPE
、
SIGILL
与
SIGSEGV
都
是不可恢复的。也就是说,如果使用
signal()
为
这三
种信号其中一个安装处理器,那么处理器函数不会返回。如果处理器函数返回,则程序
的行为是未定义的。至于其他信号类型,当处理器函数返回时,程序会从之前发生信号
的地方继续执行。
信号处理器函数必须遵循一些约束,因为在执行这些函数时,系统与程序的状态是未定 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

算法精讲视频课程:24篇系列讲座

算法精讲视频课程:24篇系列讲座

罗伯特·塞奇威克, 凯文·韦恩(Kevin Wayne)

Publisher Resources

ISBN: 9787111562207