From mboxrd@z Thu Jan 1 00:00:00 1970 From: random832@fastmail.com (Random832) Date: Tue, 19 Sep 2017 14:03:05 -0400 Subject: [TUHS] Happy birthday, Dennis Ritchie! [ really sun vs dec/apollo --> X and NeWS ] In-Reply-To: <20170919144206.GP25650@mcvoy.com> References: <1505782328.3172479.1110519744.63D53ACC@webmail.messagingengine.com> <20170919025031.GA25650@mcvoy.com> <20170919144206.GP25650@mcvoy.com> Message-ID: <1505844185.1333585.1111450208.3E3B7C76@webmail.messagingengine.com> On Tue, Sep 19, 2017, at 10:42, Larry McVoy wrote: > slib.c:1653 (bk-7.3): open failed: permission denied > > which is way way way more useful than just permission denied. Well. It's less useful in one way - it doesn't say what file it was trying to open. You could pass the filename *instead* of "open failed", but that still omits the issue I had pointed out: what were you trying to open the file for (at the very least, were you trying to read, write, or exec it). Ideally the function would have a format and arguments. Another thing that's unfortunately not easy to solve is whether an error accessing a file was due to a problem (permissions/nonexistence) with the file itself, or one of the directories along the way. This information isn't provided by the OS, either, so at best you can detect an error and then check every component yourself.