[master/f20/rhel7] Ignore SIGINT (#971323)

Anne Mulhern amulhern at redhat.com
Mon Oct 28 18:25:13 UTC 2013



----- Original Message -----
From: "Chris Lumens" <clumens at redhat.com>
To: anaconda-patches at lists.fedorahosted.org
Sent: Monday, October 28, 2013 10:03:16 AM
Subject: Re: [master/f20/rhel7] Ignore SIGINT (#971323)

> diff --git a/anaconda b/anaconda
> index b00c78c..ce37365 100755
> --- a/anaconda
> +++ b/anaconda
> @@ -763,7 +763,7 @@ if __name__ == "__main__":
>      iutil.setup_translations(gettext)
>  
>      # reset python's default SIGINT handler
> -    signal.signal(signal.SIGINT, signal.SIG_DFL)
> +    signal.signal(signal.SIGINT, signal.SIG_IGN)
>      signal.signal(signal.SIGSEGV, isys.handleSegv)
>      signal.signal(signal.SIGTERM, lambda num, frame: sys.exit(1))
>  

ACK to this part.

> diff --git a/pyanaconda/threads.py b/pyanaconda/threads.py
> index 1f1d9c6..b861cea 100644
> --- a/pyanaconda/threads.py
> +++ b/pyanaconda/threads.py
> @@ -166,8 +166,6 @@ class AnacondaThread(threading.Thread):
>          log.info("Running Thread: %s (%s)" % (self.name, self.ident))
>          try:
>              threading.Thread.run(self, *args, **kwargs)
> -        except KeyboardInterrupt:
> -            raise
>          except:
>              threadMgr.set_error(self.name, *sys.exc_info())
>              sys.excepthook(*sys.exc_info())

But have you verified that this will work?  I guess with ignoring the
signal up above, it will.  I'd just like to be sure.

- Chris

I've verified complete unresponsiveness to Ctrl-C.
No exit, no KeyboardInterrupt logged in any logs in /tmp.

Other than that, I can't think of anything to check.

- mulhern


More information about the anaconda-patches mailing list