Re: openat()

From: Ulrich Drepper
Date: Wed Nov 09 2005 - 16:29:05 EST


Miklos Szeredi wrote:
What's wrong with using '/proc/self/fd/N' to implement it?

I thought the intention was to have file descriptors referring to files, not directories, to represent the directories they are in. In those cases simply using /proc/PID/fd/N/some/more/dirs wouldn't work and neither does /proc/PID/fd/N/../some/more/dirs.

Looking at the Sol man page again it seems they don't allow this case but this has to be guessed from the error codes, not the description. In this case the /rpco approach should be OK.

But there are always people questioning the use of /proc. We already have quite a few such cases and adding more is no issue for me, but not relying on /proc would appease some people.

--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/