diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-07-19 12:03:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-07-19 12:03:23 +0000 |
commit | 50903881fa52d8d8f03e6ef8b622937617281787 (patch) | |
tree | 741fc416dd31d96354fa2987673628cb66e8b4f9 /perl-install/standalone | |
parent | 8da1e377ab895bd8607f74a89c79d326b65aac6f (diff) | |
download | drakx-backup-do-not-use-50903881fa52d8d8f03e6ef8b622937617281787.tar drakx-backup-do-not-use-50903881fa52d8d8f03e6ef8b622937617281787.tar.gz drakx-backup-do-not-use-50903881fa52d8d8f03e6ef8b622937617281787.tar.bz2 drakx-backup-do-not-use-50903881fa52d8d8f03e6ef8b622937617281787.tar.xz drakx-backup-do-not-use-50903881fa52d8d8f03e6ef8b622937617281787.zip |
unsensitive buttons immediatly once ifup/isdown has completed
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/net_monitor | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor index b001235d2..1f59d0024 100755 --- a/perl-install/standalone/net_monitor +++ b/perl-install/standalone/net_monitor @@ -32,6 +32,7 @@ use common; use network::netconnect; use network::tools; use MDK::Common::Globals "network", qw($in); +use POSIX; if ("@ARGV" =~ /--status/) { print connected(); exit(0) } my $force = "@ARGV" =~ /--force/; @@ -142,6 +143,22 @@ Glib::Source->remove($time_tag2); $time_tag2 = Glib::Timeout->add(20000, \&update); connection() if $connect && !$isconnected || $disconnect && $isconnected; + +my $tool_pid; + +$SIG{CHLD} = sub { + my $child_pid; + do { + $child_pid = waitpid(-1, POSIX::WNOHANG); + if ($tool_pid eq $child_pid) { + undef $tool_pid; + $button_connect->set_sensitive(1); + $button_close->set_sensitive(1); + } + } while $child_pid > 0; +}; + + $window1->main; ugtk2->exit(0); @@ -236,9 +253,9 @@ sub connection() { gtkflush(); if ($wasconnected == 1) { - stop_connection(); + $tool_pid = stop_connection(); } else { - start_connection(); + $tool_pid = start_connection(); } } |