Re: signal handler problems in screenshot plug-in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

quinet@xxxxxxxxxx (Raphael Quinet) writes:

> I took a look at bug #27786 "screenshot plugin on Solaris takes bus
> error on exit" because I wanted to see if I could reproduce it.  Well,
> I got another problem: the screenshot plug-in exits with "xwd didn't
> work" before giving any results.  If my followup message makes it to
> #27786 (http://bugs.gnome.org/db/27/27786.html), you will read that
> xwd does work but the plug-in thinks that it doesn't.  As a result, it
> exits prematurely and leaves the temporary files in the user's dir.
> 
> I tried to debug this and I finally came to the conclusion that
> waitpid() fails because the SIGCHLD signal handler installed by
> libgimp steals the return status of the xwd child before waitpid() in
> screenshot.c has a chance to get it.  In libgimp/gimp.c, the signal
> handler gimp_plugin_sigchld_handler() calls waitpid() in a loop and
> throws away the child status before returning.

> I think that the best way to fix the screenshot plug-in is to add this
> before the call to fork():
>   gimp_signal_private (SIGCHLD, SIG_DFL, SA_RESTART);
> (don't forget to #include <libgimp/gimpsignal.h>)

This seems to work fine (at least under Linux). I'm only wondering why
the gz, bzip2 and mail plugins do work under Solaris then. Or is this
not the case ?


Salut, Sven



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux