[libeio] Patch / Addition of eio_mkstemp, eio_realpath, eio_access

Marc Lehmann schmorp at schmorp.de
Sun Feb 21 10:56:26 CET 2010

On Sat, Feb 20, 2010 at 07:35:25PM +1100, Micheil Smith <micheil at brandedcode.com> wrote:
> Hi all,

First, please format your e-mail in a readable way when taking part in
public discussions. Making your e-mails hard to read for others will make
them less inclined to read or reply to them,

> I've recently been doing work with the node.js project, and I've been updating their filesystem module to support a lot more of the functionality that lbeio provides. I have come across a few cases where libeio doesn't provide something that may be really useful, these cases are:

libeio tries to provide basic functionality. mkstemp is easily replicated,
realpath is not very portable and access is really useless and shouldn't
be used in new code.

on top of that, these are commonly implemented in userspace and take a lot
of stackspace, which libeio doesn't provide.

so right now, I am not so inclined to include them.

as you pointed out, if you really need them, then eio_custom should work.

> - access — I also don't have an implementation of this, but the use case is for this is to check if a file is readable / writable / executable by the process's uid/gid (If I'm understanding the documentation on it correctly).

yes, and specifically not according to the effective uid/gid, which causes a
number of security issues. it also isn't very reliable.

if you want to know whether you can open a file, open it.

> I'd be willing to try and implement patches for these, although, I haven't done a heap of C++ before. Would these methods be considered for inclusion in libeio?

well, libeio is written in C of course, so the patches would have to be in C.

right now, I'd like to have a compelling argument for those functions,
that are strong enough to withstand the potential portability issues
libeio runs into them, and why they really have to be done as part of

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list