summaryrefslogtreecommitdiff
path: root/lib/spack/llnl/util
diff options
context:
space:
mode:
authorBen Cowan <benc@txcorp.com>2021-02-01 07:26:47 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2022-03-17 09:01:01 -0700
commit81bc00d61fd9872514e5e25b4af405e6d3c9202e (patch)
treeecd03063fbad9a0cf4b9fa3a9c0e1b29f0489f32 /lib/spack/llnl/util
parentb26b3bebb4f44009f1e452b983b8fedb2e4e17ef (diff)
downloadspack-81bc00d61fd9872514e5e25b4af405e6d3c9202e.tar.gz
spack-81bc00d61fd9872514e5e25b4af405e6d3c9202e.tar.bz2
spack-81bc00d61fd9872514e5e25b4af405e6d3c9202e.tar.xz
spack-81bc00d61fd9872514e5e25b4af405e6d3c9202e.zip
Adding basic Windows features (#21259)
* Snapshot of some MSVC infrastructure added during experiments a while ago. Rebasing from spack/develop. * Added platform and OS definitions for Windows. * Updated Windows platform file to conform to new archspec use. * Added Windows as a platform; introduced some debugging code. * Added type annotations. * Fixed copyright. * Removed print statements. * Ensure `spack arch` returns correctly on Windows (#21428) * Correctly identify windows as 'windows-Windows10-AMD64'
Diffstat (limited to 'lib/spack/llnl/util')
-rw-r--r--lib/spack/llnl/util/tty/log.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py
index 1a93b570a5..566d180645 100644
--- a/lib/spack/llnl/util/tty/log.py
+++ b/lib/spack/llnl/util/tty/log.py
@@ -564,7 +564,7 @@ class log_output(object):
sys.stdout.flush()
sys.stderr.flush()
- # Now do the actual output rediction.
+ # Now do the actual output redirection.
self.use_fds = _file_descriptors_work(sys.stdout, sys.stderr)
if self.use_fds:
# We try first to use OS-level file descriptors, as this
@@ -725,7 +725,8 @@ def _writer_daemon(stdin_multiprocess_fd, read_multiprocess_fd, write_fd, echo,
# write_fd to terminate the reading loop, so we close the file descriptor
# here. Forking is the process spawning method everywhere except Mac OS
# for Python >= 3.8 and on Windows
- if sys.version_info < (3, 8) or sys.platform != 'darwin':
+ if sys.version_info < (3, 8) \
+ or sys.platform not in ['darwin', 'cygwin']:
os.close(write_fd)
# Use line buffering (3rd param = 1) since Python 3 has a bug