FUSE-based file system to inject faults
github.com
github.com
This is kind of a pet peeve of mine. I've seen way too much FLOSS as well as proprietary C code that simply assumes return value >0 means everything was processed, or assume -1 means unrecoverable error and don't even bother to check for e.g. EINTR.
I'm curious just how bad some programs might fall on their nose when they hit such an error condition.
#include <stdio.h>I guess I'm thinking about something that's more like a strategy that you tell the system. E.g. if it's retryable, so do this many times or up to this many seconds. If it's not possible to write (out of space, device no longer exists, internet is down), then hand me back a string I can display to my user about the error. Etc. Something that is more akin to all the cases that you'd have to handle being done inside of a library call, with easy predictable ways to work with very few possible error(s) that get returned.
The Samba client code worked fine though :-).