diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-06-19 13:01:42 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-06-19 13:01:42 -0700 |
commit | 36232eb7e1323832df24031957e647ca8675a2e9 (patch) | |
tree | 91332f187cbdf22afbc8a48da99c86ef655b6fea /parser.y | |
parent | 85507df4b09df885ad294fb49722ddcde34c76f8 (diff) | |
download | txr-36232eb7e1323832df24031957e647ca8675a2e9.tar.gz txr-36232eb7e1323832df24031957e647ca8675a2e9.tar.bz2 txr-36232eb7e1323832df24031957e647ca8675a2e9.zip |
system: stop using popen if we have fork.
On all the platforms on which TXR is regularly built, there is
fork, including the Windows port via Cygwin. We therefore
don't have to be using popen for the open-command function.
The handling the stream redirection will be more efficient if
we implement open-command in terms of open-process, and the
special mode string extensions for redirection like ">21"
will work, too.
* stream.c (fds_subst, fds_swizzle): Define these functions
only for !HAVE_FORK_STUFF platforms.
(open_command): popen-based implementation moved down into a
section of code for !HAVE_FORK_STUFF platforms. A separate
implementation is written for HAVE_FORK_STUFF platforms
which passes the command to an appropriate Windows native
or POSIX interpreter.
* utf8.c (w_popen): Nothing but open-command calls this
function, so we don't need it on HAVE_FORK_STUFF platforms.
Wrap with #if.
* utf8.h (w_popen): wrap with #if.
Diffstat (limited to 'parser.y')
0 files changed, 0 insertions, 0 deletions