Skip to Content
LINUX系統程式設計 第二版
book

LINUX系統程式設計 第二版

by Robert Love
December 2013
Intermediate to advanced
496 pages
8h 57m
Chinese
GoTop Information, Inc.
Content preview from LINUX系統程式設計 第二版
信號
|
379
SA_ONESHOT
這是一個已廢棄的 non-POSIX 旗標,等效於
SA_RESETHAND
(稍後會討論)。你可以使
SA_RESETHAND
來取代此旗標,不過你會在較舊的程式碼中看到此旗標。
SA_ONSTACK
此旗標用於指示系統在一個
替代的信號堆疊
alternative signal stack
)—提供自
sigaltstack()
—上調用所指定的信號處理程序。如果你並未提供一個替代的堆疊,
則會使用預定的堆疊—也就是,系統的行為如同你並未提供此旗標一樣。替代的信
號堆疊很少被用到,儘管它們可以被用在某些執行緒堆疊較小的 Pthread 應用程式
上,以避免某些信號處理程序把堆疊用光。本書並不會進一步探討
sigaltstack()
SA_RESTART
此旗標會使得遭信號中斷之系統呼叫以 BSD 的形式重新啟動。
SA_RESETHAND
此旗標會啟用「一次」(one-shot)模式。一旦從信號處理程序返回,該信號的行為
會被重置為預定方式。
sa_restorer
欄位已廢棄,而且不再用於 Linux。反正,它不是 POSIX 的一部分。就假
裝它不存在,不要跟它打交道。
執行成功時,
sigaction()
會傳回
0
。執行失敗時,則會傳回
-1
並把
errno
設定為下面其
中一個錯誤碼:
EFAULT
act
oldact
是一個無效的指標。
EINVAL
signo
是一個無效的信號、
SIGKILL
SIGSTOP
siginfo_t 結構
siginfo_t
結構也定義於
<sys/signal.h> ...
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

深入理解運算原理|從簡單的機器到無所不能的程式

深入理解運算原理|從簡單的機器到無所不能的程式

Tom Stuart
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow

Publisher Resources

ISBN: 9789862769812