Skip to content

Latest commit

 

History

History

0x05-processes_and_signals

Project Title: alx-system_engineering-devops

Description

This repository contains a set of Bash and C scripts related to processes and signals. Each script is designed to perform specific tasks, such as displaying process information, managing processes, and handling signals. Additionally, there is a C program that creates zombie processes.

Table of Contents

  1. What is my PID
  2. List your processes
  3. Show your Bash PID
  4. Show your Bash PID made easy
  5. To infinity and beyond
  6. Don't stop me now!
  7. Stop me if you can
  8. Highlander
  9. Beheaded process
  10. Process and PID file
  11. Manage my process
  12. Zombie

How to Use

1. What is my PID

This script displays its own PID.

./0-what-is-my-pid

2. List your processes

This script displays a list of currently running processes.

./1-list_your_processes

3. Show your Bash PID

This script displays lines containing the word "bash" and its PID.

./2-show_your_bash_pid

4. Show your Bash PID made easy

This script displays the PID and process name of processes containing the word "bash."

./3-show_your_bash_pid_made_easy

5. To infinity and beyond

This script displays "To infinity and beyond" indefinitely.

./4-to_infinity_and_beyond

6. Don't stop me now!

This script stops the process created by 4-to_infinity_and_beyond using the kill command.

./5-dont_stop_me_now

7. Stop me if you can

This script stops the process created by 4-to_infinity_and_beyond without using kill or killall.

./6-stop_me_if_you_can

8. Highlander

This script displays "To infinity and beyond" and additional messages, becoming invincible upon receiving a SIGTERM signal.

./7-highlander

9. Beheaded process

This script kills the process created by 7-highlander.

./8-beheaded_process

10. Process and PID file

This script creates a PID file, displays messages, and terminates itself on signal reception.

sudo ./100-process_and_pid_file

11. Manage my process

This script manages the 100-process_and_pid_file script, providing start, stop, and restart functionalities.

sudo ./101-manage_my_process {start|stop|restart}

12. Zombie

This C program creates 5 zombie processes.

gcc 102-zombie.c -o zombie
./zombie

Author

This project is maintained by Paschal Ugwu.