0

A signal handler installed by a parent process is preserved by the fork() (the child process inherits the handler) but what happens when a process does an exec call ?

The handlers that the process has are maintained or do they disappear ?

Rowooz
  • 31
  • 3
  • *fork* is a duplication of the process, *exec* is a replacement by another program, thus no specific handler from the previous process remain when the new one runs. – Déjà vu Jun 21 '22 at 14:09
  • 1
    It can't possibly be preserved. The process's memory, including the code for the handler, gets replaced by `exec`. – ikegami Jun 21 '22 at 14:24

0 Answers0