Rev | Line | |
---|
[8096] | 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 | |
---|
| 6 | If os.kill(pid, signal.SIGTERM) fails, currently guake fails as well |
---|
| 7 | we should allow this command to fail withouth throwing an |
---|
| 8 | exception. |
---|
| 9 | --- |
---|
| 10 | src/guake | 5 ++++- |
---|
| 11 | 1 files changed, 4 insertions(+), 1 deletions(-) |
---|
| 12 | |
---|
| 13 | diff --git a/src/guake b/src/guake |
---|
| 14 | index 6d8f9c5..72ea56e 100644 |
---|
| 15 | --- a/src/guake |
---|
| 16 | +++ b/src/guake |
---|
| 17 | @@ -1259,7 +1259,10 @@ class Guake(SimpleGladeApp): |
---|
| 18 | call this in another thread. This doesn't change any thing in |
---|
| 19 | UI, so you can use python's start_new_thread. |
---|
| 20 | """ |
---|
| 21 | - os.kill(pid, signal.SIGTERM) |
---|
| 22 | + try: |
---|
| 23 | + os.kill(pid, signal.SIGTERM) |
---|
| 24 | + except OSError: |
---|
| 25 | + pass |
---|
| 26 | num_tries = 30 |
---|
| 27 | |
---|
| 28 | while num_tries > 0: |
---|
| 29 | -- |
---|
| 30 | 1.7.7.6 |
---|
| 31 | |
---|
Note: See
TracBrowser
for help on using the repository browser.