Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is a signal in the context of Linux?
Think about how a computer alerts a program.
What does the SIGINT signal typically indicate?
Consider user actions that stop running programs.
What is the purpose of the signal() function?
Think about how we inform the program about what to do when a signal arises.
True or False: A signal handler can be defined using the sigaction() function.
Consider both functions that relate to signals.
Design a simple C program that registers a signal handler for SIGTERM. The program should perform a cleanup operation (e.g., closing files) and then terminate gracefully when SIGTERM is received.
Think about what resources need to be cleaned before exiting.
Explain how user-defined signal handlers can create race conditions in concurrent applications. Provide an example where this might occur.
Consider situations where multiple threads may be waiting on signals or shared locks.
6 more questions in this section. Enroll free to practise them all.
Enroll free