chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in


From: Christian Kellermann
Subject: Re: [Chicken-hackers] [PATCH] handle EOVERFLOW and ENOTDIR gracefully in file/directory-exists?
Date: Sat, 8 Oct 2011 19:31:12 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Alan!

* Alan Post <address@hidden> [111008 18:48]:
> On OpenBSD, I think you'd like to handle ENAMETOOLONG by returning
> C_SCHEME_FALSE too.  On that platform, EOVERFLOW is not returned
> from stat.  (And I'm not sure what it is signalling, so I don't
> know what this if statement is checking for.)

It is still checking for EOVERFLOW, as it is defined in
include/sys/errno.h, so it at least will not take a wrong turn,
despite being useless here for OpenBSD.

> Will you add a check for ENAMETOOLONG?

So a ENAMETOOLONG should signal that the files does not exist? IMHO
this just covers up a potential programming error. The default is
to hand the result through to scheme where it will raise a sytem
error if the result is neither #t nor #f.

Or am I missing your point?
 
> In general I think these kinds of detailed checks are a fantastic
> idea, and we're going to find not every platform returns the same
> errno value for a particular error condition.

As long as the constants are defined on each system I guess we will
not run into troubles.

Kind regards,

Christian

-- 
Who can (make) the muddy water (clear)? Let it be still, and it will
gradually become clear. Who can secure the condition of rest? Let
movement go on, and the condition of rest will gradually arise.
 -- Lao Tse. 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]