コード例 #1
0
ファイル: command.py プロジェクト: health1987/paleomix
    def join(self):
        """Similar to Popen.wait(), but returns the value wrapped in a list,
        and ensures that any opened handles are closed. Must be called before
        calling commit."""
        if not self._proc:
            return [None]

        self._running = False
        return_code = self._proc.wait()
        if return_code < 0:
            return_code = signals.to_str(-return_code)
        return [return_code]
コード例 #2
0
ファイル: command.py プロジェクト: KHanghoj/epiPALEOMIX
    def join(self):
        """Similar to Popen.wait(), but returns the value wrapped in a list,
        and ensures that any opened handles are closed. Must be called before
        calling commit."""
        if not self._proc:
            return [None]

        self._running = False
        return_code = self._proc.wait()
        if return_code < 0:
            return_code = signals.to_str(-return_code)
        return [return_code]
コード例 #3
0
    def join(self):
        """Similar to Popen.wait(), but returns the value wrapped in a list,
        and ensures that any opened handles are closed. Must be called before
        calling commit."""
        try:
            if not self._proc:
                return [None]

            return_code = self._proc.wait()
            if return_code < 0:
                return_code = signals.to_str(-return_code)
            return [return_code]
        finally:
            # Close any implictly opened pipes
            for (mode, handle) in self._handles.values():
                if "w" in mode:
                    handle.flush()
                handle.close()
            self._handles = {}
コード例 #4
0
ファイル: command.py プロジェクト: schae234/pypeline
    def join(self):
        """Similar to Popen.wait(), but returns the value wrapped in a list,
        and ensures that any opened handles are closed. Must be called before
        calling commit."""
        try:
            if not self._proc:
                return [None]

            return_code = self._proc.wait()
            if return_code < 0:
                return_code = signals.to_str(-return_code)
            return [return_code]
        finally:
            # Close any implictly opened pipes
            for (mode, handle) in self._handles.values():
                if "w" in mode:
                    handle.flush()
                handle.close()
            self._handles = {}
コード例 #5
0
def test_signal__to_str__wrong_type():
    signals.to_str("SIGTERM")
コード例 #6
0
def test_signal__to_str__unknown_signal():
    signals.to_str(1024)
コード例 #7
0
def test_signal__sigterm_to_str():
    assert_equal(signals.to_str(signal.SIGTERM), "SIGTERM")