2012/12/10 Lionel Cons <[email protected]>:
> 2012/11/28 Clark WANG <[email protected]>:
>> ~{fd} is new to me. Please help me a bit...
>>
>>>
>>> >>>
>>> >>> This isn't readlink support. It's a a smart solution to allow child
>>> >>> processes to access the shell's inherited file descriptors.
>>
>>
>> Lionel, I don't quite understand this. Can you explain a bit more?
>
> ksh does not share fds with it's child processes. However with
> /proc/$PPID/fd/number (ksh uses /dev/fd instead of /proc if the latter
> is not available) it is possible to access the fds of the ksh parent
> process. ksh93 gives an easy abstraction of this feature using ~{fd}.
I don't like to bomb the ~{fd} party - but what happens if /proc is
not mounted, /dev/fd is used instead but the fd is opened with
{fd}</dirname and thus has the CLOEXEC flag set?
IMO there are two options:
- Add a new option to the shell special builtin 'exec', like --nocloexec
- Using ~{fd} clears the CLOEXEC flag automatically
Roland, David, what's your preferred solution?
Irek
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users