strerror.3: Add an example for perror() This is a nice and quick reference.
|161 ↗||(On Diff #80727)|
This is not a great example since it is undefined behaviour. In fact, before FreeBSD 11.0, this caused a segmentation fault instead of an error return.
Perhaps a better example is fd = open("/dev/null/wrong", O_RDONLY); which will fail with Not a directory.