On 29 July 2013 14:40, David Korn <d...@research.att.com> wrote:
> cc: tina.harriott.mathemat...@gmail.com
> Subject: Re: [ast-users] Passing a file descriptor to a child process?
> --------
>
>
>> ksh93 uses O_CLOEXEC to avoid passing all its file descriptors to a
>> child process. That is IMO a good thing (clean!).
>>
>> However, is there a way to pass a file descriptor to a child process?
>>
>> Tina
>> --
>> Tina Harriott  - Women in Mathematics
>> Contact: tina.harriott.mathemat...@gmail.com
>>
>
> Yes, run
>         any_command {fd}< foobar
>
> to open foobar for reading and pass it to an_command.
>         exec {fd}< foobar
> will open it only in the shell environment

How can I keep the fd open for multiple commands in a sequence?

Tina
-- 
Tina Harriott  - Women in Mathematics
Contact: tina.harriott.mathemat...@gmail.com
_______________________________________________
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to