summaryrefslogtreecommitdiff
path: root/test/Ivy::exit-bug.pl
diff options
context:
space:
mode:
Diffstat (limited to 'test/Ivy::exit-bug.pl')
-rwxr-xr-xtest/Ivy::exit-bug.pl35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/Ivy::exit-bug.pl b/test/Ivy::exit-bug.pl
new file mode 100755
index 0000000..0f7942d
--- /dev/null
+++ b/test/Ivy::exit-bug.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl -w
+
+#use lib '/home/mertz/CODE/lib/ivy-perl';
+#BEGIN { print "INC = @INC\n";}
+use strict;
+
+use Tk;
+use Ivy;
+#print "INC = @INC\n";
+Ivy->init('-loopMode' => 'TK', '-appName' => 'toto');
+my $ivy = Ivy->new();
+$SIG{HUP} = $SIG{TERM} = $SIG{QUIT} = $SIG{INT} = $SIG{STOP} = $SIG{KILL} = 'quit3';
+
+my $mw = MainWindow->new;
+my $b = $mw->Button(-text => 'Un bouton', -command => \&quit)->pack();
+$ivy->start;
+MainLoop;
+
+sub quit {
+ #$b->destroy;
+ #$mw->destroy;
+ Ivy::exit(); # fait un segmentation fault si Ctrl+C et qu'il est seul sur le bus!
+ #print "Apres Ivy::stop\n";
+ #Tk::exit();
+}
+
+sub quit2 { # fait un segmentation fault si Ctrl+C et qu'il est seul sur le bus!
+ Ivy::stop ();
+ Tk::exit ();
+}
+sub quit3 {
+ Ivy::exit(); # fait un segmentation fault si Ctrl+C
+}
+
+1;