mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	4390: In DB Access process, recover the signal handle in %SIG which was cleaned up by accident. This fix should be removed if fixed the root cause of %SIG clean up.
This commit is contained in:
		| @@ -179,6 +179,10 @@ sub init_dbworker { | ||||
|         #setup signal in NotifHandler so that the cache can be updated | ||||
|         xCAT::NotifHandler::setup($$, 0); | ||||
|  | ||||
|         # NOTE: There's a bug that sometimes the %SIG is cleaned up by accident, but we cannot figure out when and why | ||||
|         # this happens. The temporary fix is to backup the %SIG and recover it when necessary. | ||||
|         my %SIGbakup = %SIG; | ||||
|  | ||||
|         while (not $exitdbthread) { | ||||
|             eval { | ||||
|                 my @ready_socks = $clientset->can_read; | ||||
| @@ -191,6 +195,7 @@ sub init_dbworker { | ||||
|                     } else { | ||||
|                         eval { | ||||
|                             handle_dbc_conn($currcon,$clientset); | ||||
|                             unless (%SIG && defined ($SIG{USR1})) { %SIG = %SIGbakup; } | ||||
|                         }; | ||||
|                         if ($@) {  | ||||
|                             my $err=$@; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user