| # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| description "Kill input method daemons when X stopped" |
| author "chromium-os-dev@chromium.org" |
| |
| # Use 'start on stopping' and 'task' to hold up restarting the |
| # session until we're done with our process termination. |
| start on stopping ui |
| task |
| |
| # ibus-daemon creates a temporary file in /home/chronos, |
| # not in /home/chronos/user. |
| env HOME=/home/chronos |
| |
| script |
| set +e |
| . /sbin/killers |
| |
| # Ensure ibus-daemon and sub processes of ibus-daemon are |
| # terminated. Note that IBus processes are not mananged by |
| # Upstart. They are launched from Chrome. ".*" is used since the |
| # process name used for matching is limited to 15 characters. |
| term_process "ibus-.*" |
| |
| # Remove ibus-daemon's PID file. |
| rm -f ${HOME}/.config/ibus/bus/* |
| end script |