Commit a32ffeda authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Fix taint check error on event send errors, and print a backtrace.

parent 1d313fd8
...@@ -391,7 +391,7 @@ bless $callback_data_list, event::callback_data; ...@@ -391,7 +391,7 @@ bless $callback_data_list, event::callback_data;
# CODE PAST THIS POINT WAS NOT AUTOMATICALLY GENERATED BY SWIG # CODE PAST THIS POINT WAS NOT AUTOMATICALLY GENERATED BY SWIG
# #
# #
# Copyright (c) 2000-2006 University of Utah and the Flux Group. # Copyright (c) 2000-2018 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -481,6 +481,8 @@ sub event_poll_blocking($$) { ...@@ -481,6 +481,8 @@ sub event_poll_blocking($$) {
# library anyway, shouldn't be a problem. (Didn't want to have to make # library anyway, shouldn't be a problem. (Didn't want to have to make
# this a .in file.) # this a .in file.)
# #
use English;
use Carp qw(cluck);
use libtestbed; use libtestbed;
# #
...@@ -507,10 +509,9 @@ sub EventWarn($) { ...@@ -507,10 +509,9 @@ sub EventWarn($) {
$progname = "Tainted"; $progname = "Tainted";
} }
$text = "$message - In $progname\n" . $text = "$message - In $progname - $EventErrorString";
"$EventErrorString\n";
print STDERR "*** $text"; cluck($text);
} }
# #
...@@ -645,6 +646,17 @@ sub EventFork() { ...@@ -645,6 +646,17 @@ sub EventFork() {
$event::EventSendHandle = undef; $event::EventSendHandle = undef;
} }
#
# When we exit, unregister with the event system if we're connected
#
END {
if ($event::EventSendHandle) {
if (event_unregister($event::EventSendHandle) == 0) {
warn "Could not unregister with event system";
}
}
}
push @EXPORT, qw(event_subscribe event_poll event_poll_blocking EventSend push @EXPORT, qw(event_subscribe event_poll event_poll_blocking EventSend
EventSendFatal EventSendWarn EventFork EventRegister); EventSendFatal EventSendWarn EventFork EventRegister);
1; 1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# CODE PAST THIS POINT WAS NOT AUTOMATICALLY GENERATED BY SWIG # CODE PAST THIS POINT WAS NOT AUTOMATICALLY GENERATED BY SWIG
# #
# #
# Copyright (c) 2000-2006 University of Utah and the Flux Group. # Copyright (c) 2000-2018 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -92,6 +92,8 @@ sub event_poll_blocking($$) { ...@@ -92,6 +92,8 @@ sub event_poll_blocking($$) {
# library anyway, shouldn't be a problem. (Didn't want to have to make # library anyway, shouldn't be a problem. (Didn't want to have to make
# this a .in file.) # this a .in file.)
# #
use English;
use Carp qw(cluck);
use libtestbed; use libtestbed;
# #
...@@ -118,10 +120,9 @@ sub EventWarn($) { ...@@ -118,10 +120,9 @@ sub EventWarn($) {
$progname = "Tainted"; $progname = "Tainted";
} }
$text = "$message - In $progname\n" . $text = "$message - In $progname - $EventErrorString";
"$EventErrorString\n";
print STDERR "*** $text"; cluck($text);
} }
# #
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment