[Gimp-developer] Re: "Cancel" function and plugins
Toby Speight
T.M.Speight.90 at cantab.net
Wed Jun 7 09:36:56 PDT 2006
0> In article <955afe440606070619r593b88c9q1af1bdb609e7d27f at mail.gmail.com>,
0> Nathan Summers <URL:mailto:rockwalrus at gmail.com> ("Nathan") wrote:
Nathan> "Cancelling" a plugin kills it unconditionally. It's been a
Nathan> few months since I looked at that code, but I'm fairly sure
Nathan> that there is no way for a plug-in to catch that it's been
Nathan> cancelled.
Thanks for the insight; hunting around a bit more, I've found comments
to the effect that "cancel" signals the plug-in process with SIGKILL
(in a Unix world, which is where I'm comfortable). So there's nothing
I need to do to have Cancel work as expected, as long as I ensure that
I check all PDB calls and treat failures appropriately?
While we're on this subject - obviously the plug-in process has no
chance to clear up if it's killed outright, so what happens to
e.g. undo stack in this case? Is it all just left hanging as it was,
or is there some attempt by Gimp to "roll-back" the effect of the
plugin? I know, I know - UTSL! In plug-in.c, I find code in
plug_in_close() that unregisters temporary procedures and closes
dialogs, but that appears to be it. :-( Correct?
More information about the Gimp-developer
mailing list