| OLD | NEW |
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 description "Run ibus-daemon and ibus-memconf" | 5 description "Kill input method daemons when X stopped" |
| 6 author "chromium-os-dev@googlegroups.com" | 6 author "chromium-os-dev@googlegroups.com" |
| 7 | 7 |
| 8 stop on stopping ui | 8 start on stopping ui |
| 9 task |
| 9 | 10 |
| 10 # ibus-daemon creates a temporary file in /home/chronos, | 11 # ibus-daemon creates a temporary file in /home/chronos, |
| 11 # not in /home/chronos/user. | 12 # not in /home/chronos/user. |
| 12 env HOME=/home/chronos | 13 env HOME=/home/chronos |
| 13 | 14 |
| 14 post-stop script | 15 script |
| 15 | 16 |
| 16 set +e | 17 set +e |
| 17 . /sbin/killers | 18 . /sbin/killers |
| 18 | 19 |
| 19 # Ensure ibus-daemon and sub-processes are terminated. Note that these | 20 # Ensure candidate_window for input methods, ibus-daemon, and sub processes |
| 20 # processes are not mananged by Upstart. | 21 # of ibus-daemon are terminated. Note that candidate_window and IBus processes |
| 21 term_process "(candidate_w.*|ibus-[dem].*)" | 22 # are not mananged by Upstart. They are launched from Chrome. ".*" is used |
| 23 # since the process name used for matching is limited to 15 characters. |
| 24 term_process "(candidate_w.*|ibus-.*)" |
| 22 | 25 |
| 23 # Since Chrome OS regenerates /var/lib/dbus/machine-id every time when the OS | 26 # Remove ibus-daemon's PID file. |
| 24 # starts, ibus-daemon creates a new file in ${HOME}/.config/ibus/bus/ every time | |
| 25 # when it starts. It's better to remove them when ibus-daemon is terminated. | |
| 26 rm -f ${HOME}/.config/ibus/bus/* | 27 rm -f ${HOME}/.config/ibus/bus/* |
| 27 | 28 |
| 28 end script | 29 end script |
| OLD | NEW |