Understanding Linux Processes: From Creation to Management

Introduction Linux, like every modern operating system, revolves around the concept of processes. A process is an executing instance of a program, complete with its own memory space, file descriptors, and execution context. Whether you’re a system administrator tuning a production server, a developer debugging a multithreaded application, or a security analyst hunting for malicious activity, a solid grasp of how Linux processes work is essential. This article dives deep into the lifecycle of a Linux process, the kernel structures that represent it, the tools you can use to inspect and control processes, and the practical techniques for managing them in real‑world environments. By the end, you’ll be equipped to: ...

April 1, 2026 · 14 min · 2770 words · martinuke0

Daemon Mode & Session Supervisors: A Deep Dive into Managing Long‑Running Processes

Table of Contents Introduction What Is Daemon Mode? Historical Background Key Characteristics of a Daemon Why a Session Supervisor Is Needed The Limitations of Traditional Daemons User Sessions vs. System Sessions Popular Session Supervisors systemd‑user launchd (macOS) Upstart & runit [Supervisord (Python)]#supervisord-python) Designing a Daemon for Supervision Daemonizing vs. “No‑Daemon” Approach Signal Handling & Graceful Shutdown Logging Strategies Practical Example: A Simple Go Service Managed by systemd‑user Service Code systemd Unit File Testing the Supervision Loop Advanced Topics Socket Activation Dependency Graphs & Ordering Resource Limits (cgroups, ulimits) Troubleshooting Common Pitfalls Conclusion Resources Introduction Long‑running background processes—daemons—are the invisible workhorses that keep modern operating systems functional. From web servers and database engines to personal notification agents, daemons provide services without direct user interaction. Yet writing a daemon that behaves well under every circumstance is far from trivial. Over the past two decades, the session supervisor model has emerged as a robust solution to many of the classic daemon‑related headaches. ...

March 31, 2026 · 11 min · 2154 words · martinuke0

Mastering nohup: Running Unix Processes Without Hangups

Introduction When you log into a Unix or Linux system over SSH, you’re essentially opening a session that is bound to a controlling terminal. As long as that terminal exists, the kernel delivers signals—most notably SIGHUP (hang‑up)—to every process that belongs to the session. If the terminal disappears (for example, you close your SSH client or lose network connectivity), the kernel sends SIGHUP to the foreground and background jobs, and many of those jobs terminate by default. ...

March 27, 2026 · 11 min · 2306 words · martinuke0
Feedback