lua-users home
lua-l archive

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


Forgive my ignorance (can't find an answer by searching), but can I map a 
specific file descriptor onto an io object?

Socat, a handy network utility program, lets you make bidirectional 
pipelines of sub-processes in which fd 0 and 1 are the input from, and 
output back to, the command to your left in the pipeline, and fd 3 and 4 
are the input back from, and output onwards to, the command to your right 
in the pipeline.

Fds 0 and 1 are obviously just io.stdin and io.stderr. Can the same 
arrangement be made to map fds 3 and 4 onto io objects?