sigaction.2: Minor tweaks to Peter's patch
commit4e7bd2d06bd42686dcfbb8b4549c8535aaa50b00
authorAlejandro Colomar <alx.manpages@gmail.com>
Sun, 8 Aug 2021 08:41:13 +0000 (8 10:41 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 9 Aug 2021 00:32:37 +0000 (9 02:32 +0200)
treec0c35a6733a911503557d88c2efea846081c9293
parent7dd4af5158b307619930f527cb6774b2680b568f
sigaction.2: Minor tweaks to Peter's patch

- Move example program to a new EXAMPLES section
- Invert logic in the handler to have the failure in the
  conditional path, and the success out of any conditionals.
- Use NULL, EXIT_SUCCESS, and EXIT_FAILURE instead of magic numbers
- Separate declarations from code
- Put function return type on its own line
- Put function opening brace on its line

Cc: Peter Collingbourne <pcc@google.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/sigaction.2