1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-27 04:32:18 +01:00

Merge pull request #833 from mcepl/ignore_SIGNWINCH

Ignore signal.SIGWINCH.
This commit is contained in:
Marco Strigl 2020-08-31 10:38:07 +02:00 committed by GitHub
commit d3acec44e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -49,11 +49,16 @@ except ImportError:
def catchterm(*args):
raise oscerr.SignalInterrupt
# Signals which should terminate the program safely
for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM':
num = getattr(signal, name, None)
if num:
signal.signal(num, catchterm)
# Signals which should be ignored
for sig in (signal.SIGWINCH,):
signal.signal(sig, signal.SIG_IGN)
def run(prg, argv=None):
try:

View File

@ -9,7 +9,6 @@ from . import cmdln
from . import conf
from . import oscerr
import sys
import signal
import time
import imp
import inspect