mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-28 23:46:13 +01:00
parent
a57b8a60b2
commit
bf7899da83
@ -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…
Reference in New Issue
Block a user