Avoid calling stdio function calls from within signal handler.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 5 Sep 2020 03:08:12 +0000 (05:08 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 27 Sep 2020 10:23:25 +0000 (12:23 +0200)
commit08abf9ab6a87c0698a79b288858f9714f8d0f3bf
tree00a56a8990899043b7f81bff63f613b521d92f2b
parent8ce80361a582f88b22449b2d277873f7770155a0
Avoid calling stdio function calls from within signal handler.

fprintf &c is unsafe in a signal handler, because it is non-reentrant.
This change therefore uses write, and prepares the message to be
printed outside of the handler.
src/libpspp/message.c
src/libpspp/message.h
src/ui/terminal/main.c