Skip to content

Commit

Permalink
Ignore signal.SIGWINCH.
Browse files Browse the repository at this point in the history
Fixes #584
  • Loading branch information
mcepl committed Aug 27, 2020
1 parent a57b8a6 commit bf7899d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions osc/babysitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ class RPMError(Exception):
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:
Expand Down
3 changes: 1 addition & 2 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from . import conf
from . import oscerr
import sys
import signal
import time
import imp
import inspect
Expand Down Expand Up @@ -1276,7 +1275,7 @@ def _check_service(root):
t = linkinfo.get('project')
if t is None:
print("Skipping package ", p, " since it is a source link pointing inside the project.")
continue
continue
print("Submitting package ", p)
try:
result = create_submit_request(apiurl, project, p, target_project, src_update=src_update)
Expand Down

0 comments on commit bf7899d

Please sign in to comment.