-
- Downloads
`spack install` terminal output handling in foreground/background (#15723)
Makes the following changes:
* (Fixes #15620) tty configuration was failing when stdout was
redirected. The implementation now creates a pseudo terminal for
stdin and checks stdout properly, so redirections of stdin/out/err
should be handled now.
* Handles terminal configuration when the Spack process moves between
the foreground and background (possibly multiple times) during a
build.
* Spack adjusts terminal settings to allow users to to enable/disable
build process output to the terminal using a "v" toggle, abnormal
exit cases (like CTRL-C) could leave the terminal in an unusable
state. This is addressed here with a special-case handler which
restores terminal settings.
Significantly extend testing of process output logger:
* New PseudoShell object for setting up a master and child process
and configuring file descriptor inheritance between the two
* Tests for "v" verbosity toggle making use of the added PseudoShell
object
* Added `uniq` function which takes a list of elements and replaces
any consecutive sequence of duplicate elements with a single
instance (e.g. "112211" -> "121")
Co-authored-by:
Adam J. Stewart <ajstewart426@gmail.com>
Showing
- lib/spack/llnl/util/filesystem.py 2 additions, 2 deletionslib/spack/llnl/util/filesystem.py
- lib/spack/llnl/util/lang.py 25 additions, 0 deletionslib/spack/llnl/util/lang.py
- lib/spack/llnl/util/tty/log.py 335 additions, 138 deletionslib/spack/llnl/util/tty/log.py
- lib/spack/llnl/util/tty/pty.py 344 additions, 0 deletionslib/spack/llnl/util/tty/pty.py
- lib/spack/spack/test/llnl/util/lang.py 7 additions, 0 deletionslib/spack/spack/test/llnl/util/lang.py
- lib/spack/spack/test/llnl/util/log.py 0 additions, 84 deletionslib/spack/spack/test/llnl/util/log.py
- lib/spack/spack/test/llnl/util/tty/log.py 442 additions, 0 deletionslib/spack/spack/test/llnl/util/tty/log.py
Loading
Please register or sign in to comment