fixup after rebase
Signed-off-by: Gregory Becker <becker33@llnl.gov>
This commit is contained in:
parent
dcdbbd235d
commit
a2441f4656
@ -92,7 +92,7 @@ def update_installations(self) -> None:
|
||||
tty.msg(f"[BOOTSTRAPPING] Installing dependencies ({', '.join(colorized_specs)})")
|
||||
self.write(regenerate=False)
|
||||
with tty.SuppressOutput(msg_enabled=log_enabled, warn_enabled=log_enabled):
|
||||
self.install_all()
|
||||
self.install_all(fail_fast=True)
|
||||
self.write(regenerate=True)
|
||||
|
||||
def load(self) -> None:
|
||||
|
@ -1133,6 +1133,7 @@ def __init__(
|
||||
pkg: "spack.package_base.PackageBase",
|
||||
process: multiprocessing.Process,
|
||||
read_pipe: multiprocessing.connection.Connection,
|
||||
timeout: int,
|
||||
):
|
||||
"""
|
||||
Parameters:
|
||||
@ -1143,6 +1144,7 @@ def __init__(
|
||||
self.pkg = pkg
|
||||
self.process = process
|
||||
self.read_pipe = read_pipe
|
||||
self.timeout = timeout
|
||||
|
||||
def poll(self) -> bool:
|
||||
"""Check if there is data available to receive from the read pipe."""
|
||||
@ -1319,6 +1321,10 @@ def terminate(self):
|
||||
os.kill(self.p.pid, signal.SIGKILL)
|
||||
self.p.join()
|
||||
|
||||
@property
|
||||
def pid(self):
|
||||
return self.p.pid
|
||||
|
||||
@property
|
||||
def exitcode(self):
|
||||
return self.p.exitcode
|
||||
@ -1403,7 +1409,7 @@ def child_fun():
|
||||
|
||||
# Create a ProcessHandle that the caller can use to track
|
||||
# and complete the process started by this function.
|
||||
process_handle = ProcessHandle(pkg, p, read_pipe)
|
||||
process_handle = ProcessHandle(pkg, p, read_pipe, timeout=timeout)
|
||||
return process_handle
|
||||
|
||||
|
||||
@ -1420,6 +1426,8 @@ def exitcode_msg(process):
|
||||
typ = "exit" if handle.process.exitcode >= 0 else "signal"
|
||||
return f"{typ} {abs(handle.process.exitcode)}"
|
||||
|
||||
p = handle.process
|
||||
timeout = handle.timeout
|
||||
p.join(timeout=timeout)
|
||||
if p.is_alive():
|
||||
warnings.warn(f"Terminating process, since the timeout of {timeout}s was exceeded")
|
||||
|
Loading…
Reference in New Issue
Block a user