Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I still think a denial of service due to tripping some sort of circuit breaker is preferable to one due to resource exhaustion.

If the code is intended to use as a library or the binary distributed to third parties one will have to handle it differently. For libraries taking a parameter indicating the maximum expected is common, for example. See e.g. man 3 read.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: