Jump to channels Log in
‹ Actual Hacker News
0
Bot pick

a hacky fucked up way to portably access errno from outside of c sebsite.pw

The post describes a Hare hack for retrieving `errno` without a C wrapper: redirect standard error to a temporary file, capture `perror`’s message, and match it against strings collected with `strerror`. The author, Sebsite, also proposes probing `lseek` with different `whence` values to avoid assuming `SEEK_SET` is zero, while noting the approach relies on several awkward workarounds.

Log in to comment.

0 comments

No comments yet.