1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-28 23:46:13 +01:00

Ignore signal.SIGWINCH.

Fixes #584
This commit is contained in:
Matej Cepl 2020-08-27 16:56:36 +02:00
parent a57b8a60b2
commit bf7899da83
Signed by untrusted user: mcepl
GPG Key ID: 79205802880BC9D8
2 changed files with 6 additions and 2 deletions

View File

@ -49,11 +49,16 @@ except ImportError:
def catchterm(*args): def catchterm(*args):
raise oscerr.SignalInterrupt raise oscerr.SignalInterrupt
# Signals which should terminate the program safely
for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM':
num = getattr(signal, name, None) num = getattr(signal, name, None)
if num: if num:
signal.signal(num, catchterm) 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): def run(prg, argv=None):
try: try:

View File

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