diff --git a/dmoj/cptbox/tracer.py b/dmoj/cptbox/tracer.py index 204b75a11..180057128 100644 --- a/dmoj/cptbox/tracer.py +++ b/dmoj/cptbox/tracer.py @@ -16,6 +16,7 @@ from dmoj.utils.unicode import utf8bytes, utf8text PIPE = subprocess.PIPE +STDOUT = subprocess.STDOUT log = logging.getLogger('dmoj.cptbox') _PIPE_BUF = getattr(select, 'PIPE_BUF', 512) @@ -398,6 +399,8 @@ def __init_streams(self, stdin, stdout, stderr) -> None: self._stderr, self._child_stderr = os.pipe() self.stderr = os.fdopen(self._stderr, 'rb') self.stderr_needs_close = True + elif stderr == STDOUT: + self._stderr, self._child_stderr = -1, self._child_stdout elif isinstance(stderr, int): self._stderr, self._child_stderr = -1, stderr elif stderr is not None: diff --git a/dmoj/executors/PAS.py b/dmoj/executors/PAS.py index 5a1b876b1..658d5d67a 100644 --- a/dmoj/executors/PAS.py +++ b/dmoj/executors/PAS.py @@ -1,9 +1,8 @@ from dmoj.cptbox.filesystem_policies import ExactFile from dmoj.executors.compiled_executor import CompiledExecutor -from dmoj.executors.mixins import NullStdoutMixin -class Executor(NullStdoutMixin, CompiledExecutor): +class Executor(CompiledExecutor): ext = 'pas' name = 'PAS' command = 'fpc'