Signals act as asynchronous notifications informing processes of specific events. Before an operating system executes a signal handler, it must verify that the timing is appropriate for safe execution. Generally, signal actions are triggered only when transitioning from kernel space back to user spa...
Today we move on to the next phase of learning: processes and threads. Today's focus is on Linux process concepts, management commands, and related system function interfaces. 1. Core Concepts Program: A file stored in external memory containing a set of instructions and data. Process: The dynamic e...
Multi-threading and multi-processing are core approaches for concurrent software development, with key differences in how they handle memory access. Threads belonging to the same parent process share the entire process address space by default, so data exchange between threads can happen directly vi...
Download the required glibc source release archive from the official GNU glibc FTP repository at https://ftp.gnu.org/gnu/glibc/. Extract the downloaded tarball, create an out-of-tree build directory inside the extracted source folder, and prepare a separate installation target directory to avoid con...
Signal Handling Mechanisms Default, Ignore, and Custom Signal Handlers #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> void custom_signal_handler(int sig_num) { if (sig_num == SIGINT) { printf("Received SIGINT signal (Ctrl+C)\n"); } }...