CS FundamentalsVery hardGATE CS
A process ignores SIGINT and then calls exec() to run a new program. Which statement is correct?
- A. All signals are reset to default, including ignored ones
- B. The handler functions remain installed in the new program
- C. SIGINT remains ignored in the new program, but any signal for which a handler function was installed is reset to its default action
- D. exec() fails when any signal is ignored
Correct answer: C. SIGINT remains ignored in the new program, but any signal for which a handler function was installed is reset to its default action
A caught signal's handler address would be meaningless in the new image, so it is reset to default. Ignored dispositions (SIG_IGN) and the signal mask are inherited across exec; this is how nohup works.
More Operating Systems questions
- Which signals can neither be caught nor ignored by a process?
- How many of these statements about microkernels are correct? 1. Device drivers and file systems typically run in user space as servers. 2…
- What is the purpose of the dual-mode (user/kernel) bit together with a timer interrupt?
- A system call such as getpid() costs about 100 ns, while a plain function call costs about 2 ns. Which is the main reason?
- In which order does the long-term, medium-term and short-term scheduler act on a process, and which one runs most frequently?
- Which scheduling algorithm can be implemented as a special case of priority scheduling where priority = 1 / (predicted next CPU burst)?