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:
commit
d3acec44e3
@ -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:
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user