cc: [email protected]
Subject: Re: Re: [patch] Add $ cd -f $dirfd relative_path # to "cd" builtin... 
/  was: Re: [ast-developers] When will the tree reopen for normal patches?
--------

> -- snip --
> $ bash -c 'rm -Rf transaction_done ;mkdir transaction1 ; exec
> {n}<"transaction1" ; n=$n ~/bin/ksh -c "mv transaction1
> transaction_done ; cd -f \$n . ; pwd -L ; pwd -P ; true"'
> .
> /home/test001/tmp/l1/transaction_done
> -- snip --


This example seems to violate POSIX.

redirect {n}<"/etc"  opens file descritor $n with close-on exec
so it will be close for ksh.

Maybe you meant:

rm -Rf transaction_done ;mkdir transaction1 
n=$n ~/bin/ksh -c "mv transaction1 > transaction_done ; cd -f \$n . ; pwd -L ; 
pwd -P ; true" {n}<"transaction1"


This works in ksh bug gives a pathname for the logical directory
and the output is
/proc/19478/fd/11
/home/dgk/src/cmd/ksh93/gsf9/transaction_done



David Korn
[email protected]
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to