On Wednesday 11 November 2009 17:13:04 Eric Blake wrote:
> Here's a thought (no immediate rush to implement, though).  Should we
>  expose various *at functions to shell scripting, by adding a new option to
>  specify which fd to pass as the directory argument?  This would allow the
>  creation of virtual directory change semantics without the cost of forking
>  a subshell around a cd command.  For an envisioned example,
> 
> cd /tmp
> mkdir -p sub
> {
>   ln --at=4 -sf foo bar   # call symlinkat("foo",4,"bar")
>   readlink --at=4 -m bar  # call areadlinkat(4,"bar")
> } 4< sub
> 
> would output /tmp/sub/foo.

isnt this possible today under linux by using /proc/self/fd ?  i'm not 
suggesting this as a clean/portable replacement, just trying to better 
understand the proposal.

--at-fd might be a better explicit option without getting too verbose ?
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to