[Top][All Lists]

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

Re: rfc: exposing *at functions to shell

From: Mike Frysinger
Subject: Re: rfc: exposing *at functions to shell
Date: Wed, 11 Nov 2009 17:25:40 -0500
User-agent: KMail/1.12.3 (Linux/; KDE/4.3.3; x86_64; ; )

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 ?

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

reply via email to

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