[gimp-perl] Make Gimp::Net fail gracefully if gimp-perl fails rather than hanging. From a patch by Ed J. (See s



commit af73f50bc785413377c3dfa888584b9df3497a62
Author: Kevin Cozens <kevin ve3syb ca>
Date:   Wed Jan 22 18:21:03 2014 -0500

    Make Gimp::Net fail gracefully if gimp-perl fails rather than hanging.
    From a patch by Ed J.  (See second patch of bug #722468)

 Net/Net.pm |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/Net/Net.pm b/Net/Net.pm
index 34806b9..1370499 100644
--- a/Net/Net.pm
+++ b/Net/Net.pm
@@ -175,16 +175,15 @@ sub start_server {
       push(@args,"--no-data") if $opt=~s/(^|:)no-?data//;
       push(@args,"-i") unless $opt=~s/(^|:)gui//;
       push(@args,"--verbose") if $Gimp::verbose;
-      { # block to suppress warning with broken perls (e.g. 5.004)
-         exec $Gimp::Config{GIMP},
-              "--no-splash",
-              #"never",
-              "--console-messages",
-              @args,
-              "-b",
-              "(extension-perl-server $args)",
-              "(gimp-quit 0)";
-      }
+      exec $Gimp::Config{GIMP},
+           "--no-splash",
+           #"never",
+           "--console-messages",
+           @args,
+           "-b",
+          "(if (defined? 'extension-perl-server) (extension-perl-server $args))",
+          "-b",
+           "(gimp-quit 0)";
       exit(255);
    } else {
       croak __"unable to fork: $!";


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