0001-Let-allow-the-signal.SIGTERM-to-fail.patch 921 B

12345678910111213141516171819202122232425262728293031
  1. From d9c55e9192e8fbd5c84b6a7bfbf28ed88e119717 Mon Sep 17 00:00:00 2001
  2. From: Pierre-Yves Chibon <pingou@pingoured.fr>
  3. Date: Wed, 1 Aug 2012 22:30:12 +0200
  4. Subject: [PATCH] Let allow the signal.SIGTERM to fail
  5. If os.kill(pid, signal.SIGTERM) fails, currently guake fails as well
  6. we should allow this command to fail withouth throwing an
  7. exception.
  8. ---
  9. src/guake | 5 ++++-
  10. 1 files changed, 4 insertions(+), 1 deletions(-)
  11. diff --git a/src/guake b/src/guake
  12. index 6d8f9c5..72ea56e 100644
  13. --- a/src/guake
  14. +++ b/src/guake
  15. @@ -1259,7 +1259,10 @@ class Guake(SimpleGladeApp):
  16. call this in another thread. This doesn't change any thing in
  17. UI, so you can use python's start_new_thread.
  18. """
  19. - os.kill(pid, signal.SIGTERM)
  20. + try:
  21. + os.kill(pid, signal.SIGTERM)
  22. + except OSError:
  23. + pass
  24. num_tries = 30
  25. while num_tries > 0:
  26. --
  27. 1.7.7.6