[求助]Ubuntu 8.04LTS中fcitx一进程defunct

系统字体配置、中文显示和输入法问题
回复
air
帖子: 40
注册时间: 2008-10-17 0:33

[求助]Ubuntu 8.04LTS中fcitx一进程defunct

#1

帖子 air » 2008-10-25 23:02

执行

代码: 全选

ps -ef | grep fcitx 
结果如下:

代码: 全选

air     6091  5994  0 18:55 ?        00:00:00 [fcitx] <defunct>
air     6093     1  0 18:55 ?        00:00:02 /usr/local/bin/fcitx
air     7834  7811  0 22:22 pts/0    00:00:00 grep fcitx
pstree的输出如下:

代码: 全选

init─┬─NetworkManager
     ├─NetworkManagerD
     ├─acpid
     ├─atd
     ├─avahi-daemon───avahi-daemon
     ├─bonobo-activati───{bonobo-activati}
     ├─console-kit-dae───61*[{console-kit-dae}]
     ├─cron
     ├─2*[dbus-daemon]
     ├─dd
     ├─dhcdbd
     ├─fcitx
     ├─firefox───7*[{firefox}]
     ├─gconfd-2
     ├─gdm───gdm─┬─Xorg
     │           └─x-session-manag─┬─fcitx
     │                             ├─gnome-panel
     │                             ├─gnome-settings-─┬─pulseaudio─┬─gconf-helper
     │                             │                 │            └─2*[{pulseau+
     │                             │                 └─{gnome-settings-}
     │                             ├─metacity
     │                             ├─nautilus
     │                             ├─nm-applet
     │                             ├─python
     │                             ├─seahorse-agent
     │                             ├─update-notifier
     │                             └─{x-session-manag}
     ├─6*[getty]
     ├─gnome-keyring-d
     ├─gnome-power-man───{gnome-power-man}
     ├─gnome-screensav
     ├─gnome-terminal─┬─bash───pstree
     │                ├─gnome-pty-helpe
     │                └─{gnome-terminal}
     ├─gvfsd
     ├─gvfsd-burn
     ├─gvfsd-trash
     ├─hald───hald-runner─┬─hald-addon-acpi
     │                    ├─hald-addon-cpuf
     │                    ├─hald-addon-inpu
     │                    └─hald-addon-stor
     ├─klogd
     ├─mixer_applet2───{mixer_applet2}
     ├─3*[mount.ntfs]
     ├─notification-da
     ├─ntpd
     ├─pppd
     ├─syslogd
     ├─system-tools-ba
     ├─trashapplet
     └─udevd
虽然可以fcitx正常输入中文,但为何有两个fcitx进程,并且其中一个是僵死(zombie/defunct)的?如何解决?

我的.bashrc有如下设置:

代码: 全选

export LANG="en_US.UTF-8"
export LC_CTYPE="zh_CN.UTF-8"
export XMODIFIERS="@im=fcitx"
/etc/environment中有如下设置:

代码: 全选

LANG="en_US.UTF-8"
LC_CTYPE="zh_CN.UTF-8"
/usr/lib/gtk-2.0/2.10.0/immodule-files.d/libgtk2.0-0.immodules中有如下设置:

代码: 全选

"xim" "X Input Method" "gtk20" "/usr/share/locale" "en:ko:ja:th:zh"
我是从http://www.fcitx.org/download/fcitx-3.4.2.tar.bz2下载的fcitx,自己编译后再安装的。

uname -a结果为:

代码: 全选

Linux cyber 2.6.24-21-generic #1 SMP Mon Aug 25 17:32:09 UTC 2008 i686 GNU/Linux
lsb_release -a结果为:

代码: 全选

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 8.04.1
Release:        8.04
Codename:       hardy
另外,我的~/.xsession-errors中出现以下信息:

代码: 全选

/etc/gdm/Xsession: Beginning session setup...
Setting IM through im-switch for locale=zh_CN.
Start IM through /home/air/.xinput.d/zh_CN linked to /etc/X11/xinit/xinput.d/f
citx.
SESSION_MANAGER=local/cyber:/tmp/.ICE-unix/5994
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL front:0
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL front:0
Shutdown failed or nothing to shut down.
xrdb:  "*Label.background" on line 220 overrides entry on line 150
xrdb:  "*Text.background" on line 226 overrides entry on line 191
xrdb:  "*Label.foreground" on line 232 overrides entry on line 151
xrdb:  "*Text.foreground" on line 238 overrides entry on line 192
Window manager warning: Failed to read saved session file /home/air/.metacity/
sessions/default0.ms: Failed to open file '/home/air/.metacity/sessions/defaul
t0.ms': No such file or directory
11
seahorse nautilus module initialized
Initializing nautilus-share extension

** (nautilus:6132): WARNING **: Unable to add monitor: Not supported
  PID TTY          TIME CMD
 6112 ?        00:00:00 pulseaudio
为何总是报"ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL front:0"、"Failed to read saved session file /home/air/.metacity/sessions/default0.ms..."、"** (nautilus:6132): WARNING **: Unable to add monitor: Not supported"等信息?

最后,说一点我的scim包全部卸载了。
Hello, World!
头像
nicety
帖子: 92
注册时间: 2008-07-14 15:06
来自: 天津
联系:

Re: [求助]Ubuntu 8.04LTS中fcitx一进程defunct

#2

帖子 nicety » 2008-10-27 18:48

我的也是,强烈建议版主关注这个帖子。这个问题很多人都是。
希奥开源成员 加入我们
手机设备请访问:http://wap.seo-dic.com.cn
我们的口号是:让开源深入民心

Simply Enjoying Open Source !
-共享是一种美德 --
头像
nicety
帖子: 92
注册时间: 2008-07-14 15:06
来自: 天津
联系:

Re: [求助]Ubuntu 8.04LTS中fcitx一进程defunct

#3

帖子 nicety » 2008-10-27 18:50

我的最近在完全卸载scim,fcitx后重新地fcitx之后不存在了。但是仍不知道原因
希奥开源成员 加入我们
手机设备请访问:http://wap.seo-dic.com.cn
我们的口号是:让开源深入民心

Simply Enjoying Open Source !
-共享是一种美德 --
air
帖子: 40
注册时间: 2008-10-17 0:33

Re: [求助]Ubuntu 8.04LTS中fcitx一进程defunct

#4

帖子 air » 2008-10-28 1:42

简单地看了下了fcitx-3.4.2的代码,在src/main.c中有以下代码:

代码: 全选

if (bBackground) {
  pid_t           id;

  id = fork ();
  if (id == -1) {
      printf ("Can't run as a daemon!\n");
      exit (1);
  }
  else if (id > 0)
      exit (0);
}
但我感觉守护进程(daemon)的处理,不会是这么简单的吧?父进程退出了,好像没做上下文清理工作,导致fcitx父进程本身僵死?我不是做C的,有熟悉C的守护进程的,修改一下?多谢!
Hello, World!
头像
daf3707
论坛版主
帖子: 12731
注册时间: 2007-06-13 15:57
来自: 在他乡

Re: [求助]Ubuntu 8.04LTS中fcitx一进程defunct

#5

帖子 daf3707 » 2008-10-28 8:40

回复