Skip to content

Latest commit

 

History

History

0x05-processes_and_signals

ALX

processes and signals

Deamon

Intro

Here, we will explore the inner workings of the Linux operating system and how it manages and interacts with the programs that run on it. We will delve into the concept of a process, how it is created, managed and terminated by the OS, and how you as a user or a developer can interact with them using various command-line utilities and programming interfaces. Additionally, we will also take a closer look at signals, which are a key mechanism for the operating system to communicate with processes, and how they are used to interrupt, terminate, or notify processes of events. Whether you're a Linux novice or an experienced user or developer, this project will provide valuable insights into the fundamental concepts of Linux and how they apply to everyday usage.

Buckle up. Lets go!

Why was the linux process killed? Because it couldn't handle the signals 😃 😃

Why was the process feeling low? Because it was in a state of zombie 😆 😆

About

In Linux, a process is an instance of a program that is being executed by the operating system. Each process has its own memory space and system resources, and can interact with the kernel (the core of the operating system) to perform various operations. Processes can be created, terminated, and managed using various command-line utilities and programming interfaces.

A signal is a way for the operating system to communicate with a process. Signals are used to interrupt or terminate a process, or to send a notification to a process that an event has occurred. Signals are identified by a unique integer value, and can be generated by the operating system or by other processes. Signals can be handled by the process itself or ignored. Common signals include SIGINT (generated when the user presses the "CTRL+C" key combination), SIGTERM (used to request that a process terminate gracefully), and SIGKILL (used to forcefully terminate a process).

Resources

Read or Watch

  1. Linux PID
  2. Linux Processes
  3. Linux signal
  4. Process management in Linux
  5. Google
  6. Youtube

Man/help

  • ps
  • pgrep
  • pkill
  • kill
  • exit
  • trap

Learning objectives

By the end of this project, you should be able to explain to anyone without the help of Google:

  • What is a PID
  • What is a process
  • How to find a process’ PID
  • How to kill a process
  • What is a signal
  • What are the 2 signals that cannot be ignored

Requirements

General

  • Allowed editors: vi, vim, emacs
  • All your files will be interpreted on Ubuntu 20.04 LTS
  • All your files should end with a new line
  • A README.md at the root of the project folder
  • All your Bash script files must be executable
  • Your Bash script must pass Shellcheck (version 0.7.0) without any error
  • The first line of all your Bash scripts should be exactly #!/usr/bin/env bash
  • The second line of all your Bash scripts should be a comment explaining what is the script doing

More info

For those who want to know more and learn about all signals, checkout this this article