4 ms·
> it's not safe to do anything more complex than setting a flag Though I generally agree with the sentiment, there are other limited but still useful things yo
by usefulcat 3y ago
> it's not safe to do anything more complex than setting a flag
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