[Uim] uim gtk2 input method leaks fd and crashes nautilus

Frederic Crozat fcrozat at mandrakesoft.com
Fri Mar 19 18:34:54 EET 2004


Hi,

With Michael Meeks's help, I was able to fix Mdk bug
http://qa.mandrakesoft.com/show_bug.cgi?id=8607 (and I've also filled a
bug upstream on GNOME : http://bugzilla.gnome.org/show_bug.cgi?id=137519
).

Summary of the bug :
if uim-helper-server isn't running, nautilus will crash while
initialising its views through libbonobo/ORBit.

This is happening with uim 0.2.8 (which we are shipping with Mdk 10.0)
but I've tested also with uim 0.3.2 which is also causing the crash.

This bug is caused by the use of "exit" instead of "_exit" in uim-ipc.c,
causing ORBit exit handler to be called.

The attach patch fixes the problem.

During my investigation, I also discovered uim-helper-server is not
closing all file descriptors it inherited from the gtk2 application
which initialized the gtk input method. It should do something like this
:
      int open_max;
      int i;
                                                                                
      open_max = sysconf (_SC_OPEN_MAX);
      for (i = 3; i < open_max; i++)
         fcntl (i, F_SETFD, FD_CLOEXEC);

-- 
Frederic Crozat <fcrozat at mandrakesoft.com>
Mandrakesoft
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uim-0.2.8-crash.patch
Type: text/x-patch
Size: 644 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/uim/attachments/20040319/9ee4763d/attachment.bin 


More information about the uim mailing list