Though I generally agree with the sentiment, there are other limited but still useful things you can do, for example write() is allowed:
const char msg[] = "\ncaught signal, finishing..\n"; write(2, msg, sizeof(msg)); // 1 == stdout, 2 == stderr
Nowadays signalfd and pidfd are the better options.
Though I generally agree with the sentiment, there are other limited but still useful things you can do, for example write() is allowed: