Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
LINUX系統程式設計 第二版
by
Robert Love
December 2013
Intermediate to advanced
496 pages
8h 57m
Chinese
GoTop Information, Inc.
Content preview from
LINUX系統程式設計 第二版
行程管理
|
181
則會產生一個包含三個行程的行程群組。於是,
shell
可以同時通知這三個行程。因為用
戶在控制台(
console
)之上鍵入這道命令的時候,並未加上結尾的「
&
」符號,所以我
們也可以說此行程群組位於前景。
圖
5-1
可以看到期程、行程群組、行程與控制終端機
之間的關係。
圖
5-1
期程、行程群組、行程與控制終端機之間的關係
Linux
提供了若干介面,可用於設定與取得「與所指定之行程有關的」期程及行程群
組。這些介面主要是供
shell
所使用,不過也可以用在想要擺脫期程與行程群組之事務
的行程,例如監控程式(
daemon
)。
期程系統呼叫
shell
會在登入的時候建立新的期程。它們完成此事的方式係透過一個特殊的系統呼叫,
以簡化新期程的建立:
#include <unistd.h>
pid_t setsid (void);
在行程尚不是一個行程群組的帶頭者時,叫用
setsid()
將可建立一個新的期程。進行叫
用之行程,將會成為新期程的帶頭者,以及此期程的唯一成員;此期程並未具有控制終
端機。此呼叫還會在此期程中建立一個新的行程群組,並且讓進行叫用之行程成為行程
群組的帶頭者以及此行程群組的唯一成員。新期程與行程群組之識別碼會被設定成進行
叫用之行程的
pid
。
期程
行程群組
行程
控制終端機
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.
Start your free trial
You might also like
優雅的SciPy|Python科學研究的美學
Juan Nunez-Iglesias, Stéfan van der Walt, Harriet Dashnow
成為卓越程式設計師的38項必修法則
Pete Goodliffe
深入理解運算原理|從簡單的機器到無所不能的程式
Tom Stuart
C++语言导学(原书第2版)
本贾尼 斯特劳斯特鲁普
Publisher Resources
ISBN: 9789862769812