Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
常駐サービスを実現するデーモンプロセス
Search
Satoru Takeuchi
PRO
February 23, 2025
Technology
0
49
常駐サービスを実現するデーモンプロセス
以下動画のテキストです。
https://youtu.be/wqetSitDL34
Satoru Takeuchi
PRO
February 23, 2025
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
Rook: Intro and Deep Dive With Ceph
sat
PRO
1
90
会社員しながら本を書いてきた知見の共有
sat
PRO
3
770
デバイスにアクセスするデバイスファイル
sat
PRO
1
33
ファイルシステムのデータを ブロックデバイスへの操作で変更
sat
PRO
1
29
デバイスドライバ
sat
PRO
0
45
マルチスレッドの実現方法 ~カーネルスレッドとユーザスレッド~
sat
PRO
2
120
共有メモリ
sat
PRO
3
67
マルチスレッドプログラム
sat
PRO
3
56
Linuxのブートプロセス initramfs編
sat
PRO
2
76
Other Decks in Technology
See All in Technology
GitHub Copilot の概要
tomokusaba
1
130
BrainPadプログラミングコンテスト記念LT会2025_社内イベント&問題解説
brainpadpr
1
160
より良いプロダクトの開発を目指して - 情報を中心としたプロダクト開発 #phpcon #phpcon2025
bengo4com
1
3.1k
A2Aのクライアントを自作する
rynsuke
1
170
AIの最新技術&テーマをつまんで紹介&フリートークするシリーズ #1 量子機械学習の入門
tkhresk
0
130
_第3回__AIxIoTビジネス共創ラボ紹介資料_20250617.pdf
iotcomjpadmin
0
150
AWS CDK 実践的アプローチ N選 / aws-cdk-practical-approaches
gotok365
6
700
AIエージェント最前線! Amazon Bedrock、Amazon Q、そしてMCPを使いこなそう
minorun365
PRO
13
4.9k
Witchcraft for Memory
pocke
1
220
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
130
[TechNight #90-1] 本当に使える?ZDMの新機能を実践検証してみた
oracle4engineer
PRO
3
170
250627 関西Ruby会議08 前夜祭 RejectKaigi「DJ on Ruby Ver.0.1」
msykd
PRO
2
240
Featured
See All Featured
Docker and Python
trallard
44
3.4k
Building Adaptive Systems
keathley
43
2.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
How GitHub (no longer) Works
holman
314
140k
What's in a price? How to price your products and services
michaelherold
246
12k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Bash Introduction
62gerente
614
210k
Thoughts on Productivity
jonyablonski
69
4.7k
Transcript
常駐サービスを実現する デーモンプロセス Feb. 23rd, 2025 Satoru Takeuchi X: satoru_takeuchi 1
デーモンプロセスとは • 常駐サービスを実現するプロセス ◦ systemdの”*.service”というユニットに結びつくプロセスはデーモン • 端末のハングアップに影響を受けない ◦ 端末に結びついていないセッションに属する =>
端末のハングアップの影響を受けない • “demon(悪魔)”ではなく”daemon(守護神)” 2
デーモン図解 3 デーモン用のセッション デーモンプロセス セッション 端末
psで見るデーモン 4 $ ps ajx PPID PID PGID SID TTY
TPGID STAT UID TIME COMMAND ... 1 330 330 330 ? -1 S<s 0 0:12 /usr/lib/systemd/systemd-journald ...
サービスの設定ファイル再読み込み機能の実現方法 • デーモンプロセスは通常再起動せずに設定ファイルを再読み込みする機能がある (e.g. systemd reload) • 設定ファイルの再読み込みは一般にSIGHUPを使う ◦ デーモンプロセスは端末に結びついていない
◦ では端末終了時に使う SIGHUPを設定ファイルの再読み込み用に使おうという考え方 5
まとめ • 常駐サービスを実現するプロセスをデーモンプロセスと呼ぶ • 端末と結びついていないため、あらゆる端末の接続が切れても終了しないように なっている • 設定ファイルの再読み込みには一般にSIGHUPシグナルを使う 6