On Mon, May 13, 2013 at 1:06 PM, Lionel Cons
<[email protected]> wrote:
> On 13 May 2013 12:38, Wendy Lin <[email protected]> wrote:
>> We're now using the feature of directory relative paths in our
>> production system in months but today ran into a bug on Solaris 10:
>> ksh -c 'builtin mkdir ; redirect {d}<$HOME ; mkdir /dev/fd/$d/x'
>> mkdir: /dev/fd/11/x: [Not a directory]
>>
>> The same line works on all other platforms (Linux, OpenBSD, FreeBSD).
>
> That's a bug in Solaris /dev/fd, fixed for Solaris 11.1+patches.
> The workaround is to use Roland Mainz's patch from
> http://lists.research.att.com/pipermail/ast-developers/2012q3/001984.html
> We're using the same patch ever since because the directory relative
> paths give a major performance boost on for long paths on NFS and
> SMBFS.

Using /dev/fd is doomed anyway because ksh93 now uses O_CLOEXEC on all
file descriptors so child processes no longer inherit the fds/.
Either use /proc/$$/fd/$dir or ~{d}/ which does the same.

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

Reply via email to