summaryrefslogtreecommitdiffstats
path: root/args.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-07 07:15:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-07 07:15:51 -0700
commitbad7fa72982a65f8e2b57ec0db7c2d2eb80b6737 (patch)
tree5415d9cbb234bd2c3cb0ba93a3a925c6e06f7524 /args.h
parent038bed1fa17743cbbfe4d219b6798d88254eef2c (diff)
downloadtxr-bad7fa72982a65f8e2b57ec0db7c2d2eb80b6737.tar.gz
txr-bad7fa72982a65f8e2b57ec0db7c2d2eb80b6737.tar.bz2
txr-bad7fa72982a65f8e2b57ec0db7c2d2eb80b6737.zip
New: standard stream redirection for subprocesses.
When subprocesses are created using open-command, open-process, run or sh, any streams not bound by those functions are obtained from *stdin*, *stdout* or *stderr*, as appropriate. Thus manipulating these variables has the effect of redirecting not only local output within the program but over coprocesses as well. * stream.c (struct save_fds): New type. (FDS_IN, FDS_OUT, FDS_ERR): New macros. (fds_init, fds_subst, fds_swizzle, fds_restore): New static functions. (open_command, open_process, run): "Swizzle" and restore the standard file descriptors. * txr.1: Updated documentation of affected function.
Diffstat (limited to 'args.h')
0 files changed, 0 insertions, 0 deletions