What is the difference between sigaction and signal?
Use sigaction() unless you’ve got very compelling reasons not to do so. The signal() interface has antiquity (and hence availability) in its favour, and it is defined in the C standard. Nevertheless, it has a number of undesirable characteristics that sigaction() avoids – unless you use the flags explicitly added to sigaction() to allow it … Read more