don't call gp_quit_write() on a plug-in with a broken pipe. Fixes bug
2007-07-30 Sven Neumann <sven@gimp.org> * app/plug-in/gimpplugin.[ch]: don't call gp_quit_write() on a plug-in with a broken pipe. Fixes bug #460878. svn path=/trunk/; revision=23076
This commit is contained in:

committed by
Sven Neumann

parent
2c02cac0ad
commit
36e8e6989a
@ -1,3 +1,8 @@
|
||||
2007-07-30 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/plug-in/gimpplugin.[ch]: don't call gp_quit_write() on a
|
||||
plug-in with a broken pipe. Fixes bug #460878.
|
||||
|
||||
2007-07-30 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/gimp.c
|
||||
|
@ -145,6 +145,7 @@ gimp_plug_in_init (GimpPlugIn *plug_in)
|
||||
|
||||
plug_in->call_mode = GIMP_PLUG_IN_CALL_NONE;
|
||||
plug_in->open = FALSE;
|
||||
plug_in->hup = FALSE;
|
||||
plug_in->pid = 0;
|
||||
|
||||
plug_in->my_read = NULL;
|
||||
@ -428,8 +429,9 @@ gimp_plug_in_close (GimpPlugIn *plug_in,
|
||||
gint status;
|
||||
#endif
|
||||
|
||||
/* Ask the filter to exit gracefully */
|
||||
if (kill_it)
|
||||
/* Ask the filter to exit gracefully,
|
||||
but not if it is closed because of a broken pipe. */
|
||||
if (kill_it && ! plug_in->hup)
|
||||
{
|
||||
gp_quit_write (plug_in->my_write, plug_in);
|
||||
|
||||
@ -616,6 +618,9 @@ gimp_plug_in_recv_message (GIOChannel *channel,
|
||||
|
||||
if (cond & (G_IO_ERR | G_IO_HUP))
|
||||
{
|
||||
if (cond & G_IO_HUP)
|
||||
plug_in->hup = TRUE;
|
||||
|
||||
if (plug_in->open)
|
||||
gimp_plug_in_close (plug_in, TRUE);
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ struct _GimpPlugIn
|
||||
|
||||
GimpPlugInCallMode call_mode; /* QUERY, INIT or RUN */
|
||||
guint open : 1; /* Is the plug-in open? */
|
||||
guint hup : 1; /* Did we receive a G_IO_HUP */
|
||||
GPid pid; /* Plug-in's process id */
|
||||
|
||||
GIOChannel *my_read; /* App's read and write channels */
|
||||
|
Reference in New Issue
Block a user