logoalt Hacker News

tremontoday at 12:42 AM2 repliesview on HN

C doesn't have exceptions, do you mean signals? If not, I don't see how that is that any different from having to handle I/O errors from write() and/or open() calls.


Replies

lights0123today at 12:48 AM

Yes, it’s the SIGBUS signal.

fulafeltoday at 7:40 AM

It's very different since at random points of your program your signal handler is caleld asynchronously, and you can only do a very limited signal-safe things there, and the flow of control in your i/o, logic etc code has no idea it's happening.

tldr; it's very different.

show 1 reply