From mboxrd@z Thu Jan 1 00:00:00 1970 From: ron@ronnatalie.com (Ron Natalie) Date: Thu, 14 Sep 2017 17:00:51 -0400 Subject: [TUHS] Happy birthday, Dennis Ritchie! [ really sun vs dec/apollo --> X and NeWS ] In-Reply-To: <20170914205058.r4zrexpig5mbvhff@matica.foolinux.mooo.com> References: <20170914205058.r4zrexpig5mbvhff@matica.foolinux.mooo.com> Message-ID: <025a01d32d9c$8c84ae10$a58e0a30$@ronnatalie.com> The error codes perror relies on don't come from "libc." They come from the kernel. The values only make sense if the error is the result of a system call. -----Original Message----- This only works if you call libc directly, or if the code you call (including your own) reuses libc errno codes. If you deal with libfoo, libfoo has its own error codes, and has no perror-like function, you must write your own :( .