projects
/
platform
/
upstream
/
ibus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ae5047
)
Fix restart problem
author
Peng Huang
<phuang@phuang.nay.redhat.com>
Thu, 12 Feb 2009 05:25:01 +0000
(13:25 +0800)
committer
Peng Huang
<phuang@phuang.nay.redhat.com>
Thu, 12 Feb 2009 05:25:01 +0000
(13:25 +0800)
bus/ibusimpl.c
patch
|
blob
|
history
diff --git
a/bus/ibusimpl.c
b/bus/ibusimpl.c
index
216de11
..
3af090d
100644
(file)
--- a/
bus/ibusimpl.c
+++ b/
bus/ibusimpl.c
@@
-901,7
+901,14
@@
_ibus_exit (BusIBusImpl *ibus,
}
else {
extern gchar **g_argv;
- execv (g_argv[0], g_argv);
+ gchar *exe;
+
+ exe = g_strdup_printf ("/proc/%d/exe", getpid ());
+ if (!g_file_test (exe, G_FILE_TEST_EXISTS)) {
+ g_free (exe);
+ exe = g_argv[0];
+ }
+ execv (exe, g_argv);
g_warning ("execv %s failed!", g_argv[0]);
exit (-1);
}