Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
常駐サービスを実現するデーモンプロセス
Search
Satoru Takeuchi
PRO
February 23, 2025
Technology
95
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
常駐サービスを実現するデーモンプロセス
以下動画のテキストです。
https://youtu.be/wqetSitDL34
Satoru Takeuchi
PRO
February 23, 2025
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
78
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
110
あなたの知らないバージョン命名規則
sat
PRO
3
920
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
73
Machine Check Exception
sat
PRO
2
69
バイナリダンプの模様を読む
sat
PRO
0
110
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
110
114-ファイルのshallow_copy.pdf
sat
PRO
2
62
113-Btrfsのスナップショット.pdf
sat
PRO
0
46
Other Decks in Technology
See All in Technology
遠藤な_めぐろLT #38 「社内のAI活用推進」@麻布台_20261009
endonanana
0
110
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
390
おそらく日本で唯一のDevRelインターン生として
husengs7
0
180
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
140
WasmをRustにする
sansantech
PRO
0
190
事業成長とデータ活用を止めないためのマネジメントへ挑戦
hiracky16
0
300
DGX Spark でどこまでハッキングができるのか?
kash1064
0
930
Loop Engineering これくらいでいい
mikanichinose
0
230
Loop Engineering, beyond prompt, context, and harness engineering
glaforge
0
100
事業活動を AI Ready にする攻めと守りのデータエンジニアリング / data-engineering-for-ai-ready-business
pei0804
7
2.6k
go-sqletch
moznion
0
140
全人類(ほぼ)AWS Organizations の上でAWSを利用している、その世界を知る話
htan
1
140
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Accessibility Awareness
sabderemane
1
240
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Code Reviewing Like a Champion
maltzj
529
40k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Typedesign – Prime Four
hannesfritz
42
3.2k
Are puppies a ranking factor?
jonoalderson
2
4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
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