20. Kernel Data Structures for Managing SignalsDescribe the key signal-related fields within the task_struct in Linux. How does the kernel use these fields to manage pending signals?
19. Understanding Pending SignalsWhat are pending signals in Linux, and how do they become pending? Explain the concept and scenarios under which signals are marked as pending.
18. Using the SA_SIGINFO FlagWhat is the SA_SIGINFO flag in the sigaction structure, and how does it modify the behavior of signal handling? Provide an example that demonstrates using SA_SIGINFO to h…
17. Setting Up Signal Handlers with sigactionExplain how to set up a signal handler using the sigaction function. Provide an example of setting up a handler for the SIGINT signal that blocks the SIGT…
16. Understanding struct sigactionDescribe the purpose of the struct sigaction in Linux signal handling. What fields does this structure contain, and what are their roles?
15. Using SA_SIGINFO for Extended Signal InformationDescribe the purpose of the SA_SIGINFO flag in the sigaction structure. Provide an example of using SA_SIGINFO to handle the SIGINT signal and acce…
14. Blocking Signals During Handler ExecutionExplain how to block signals during the execution of a signal handler using the sigaction structure. Provide an example of blocking SIGTERM while handling…
13. Understanding sigactionWhat is the sigaction function and how does it provide more robust and flexible signal handling compared to the signal() function? Describe the structure and key fields of …
12. Ignoring and Restoring Default Signal HandlingDescribe how to ignore a signal in a C program using the signal() function. Additionally, explain how to restore the default action for a signal afte…
11. Characteristics and Best Practices of Signal HandlersWhat are the key characteristics of signal handlers in Linux? Discuss the concepts of asynchronous execution, reentrancy, and atomic operation…
10. Defining and Using Signal HandlersExplain how to define and set up a signal handler in C using the signal() function. Provide an example of handling the SIGINT signal and describe what happens wh…
9. Catching Signals with Custom HandlersWhat does catching a signal mean in the context of signal handling in Linux? Illustrate with an example how to catch the SIGINT signal using a custom signal ha…
8. Ignoring SignalsExplain how a process can ignore a signal in Linux. Provide an example of how to ignore the SIGINT signal using the signal() function.
7. Default Actions of SignalsDescribe the default actions associated with signals in Linux. What are some common default actions that a signal can trigger if no custom signal handler is set up?
6. Practical Signal Handling with signal() FunctionDescribe how the signal() function works in setting up a signal handler in a C program. Provide a brief example of how to use signal() to catch the …
5. Common Signals and Their EffectsList at least five common signals defined in the signal.h header file and describe their typical use or effect on a process. How does the system handle these signal…
4. Understanding Signal Generation and HandlingExplain the terms "raise" and "catch" in the context of signal handling in UNIX and Linux systems. What are some common conditions t…
3. Signal HandlingDescribe how a process can handle signals in Linux. What are the possible actions a process can take when a signal is delivered, and how can a signal handler function be set up usin…
2. Signal Characteristics and TypesExplain the characteristics of signals in Linux. What are the two broad categories of signals, and provide examples of each.
1. Understanding SignalsWhat are signals in the context of Linux and UNIX-like operating systems, and how do they function as a form of inter-process communication?