Revert "Make a hard reset of named barrier mutexes on signal"
This reverts commit df4231341f.
			
			
This commit is contained in:
		
							parent
							
								
									df4231341f
								
							
						
					
					
						commit
						3b2ca720a8
					
				| @ -1,4 +1,3 @@ | |||||||
| #include "storage/shared_barriers.hpp" |  | ||||||
| #include "storage/storage.hpp" | #include "storage/storage.hpp" | ||||||
| #include "util/exception.hpp" | #include "util/exception.hpp" | ||||||
| #include "util/log.hpp" | #include "util/log.hpp" | ||||||
| @ -8,8 +7,6 @@ | |||||||
| #include <boost/filesystem.hpp> | #include <boost/filesystem.hpp> | ||||||
| #include <boost/program_options.hpp> | #include <boost/program_options.hpp> | ||||||
| 
 | 
 | ||||||
| #include <csignal> |  | ||||||
| 
 |  | ||||||
| using namespace osrm; | using namespace osrm; | ||||||
| 
 | 
 | ||||||
| // generate boost::program_options object for the routing part
 | // generate boost::program_options object for the routing part
 | ||||||
| @ -90,21 +87,8 @@ bool generateDataStoreOptions(const int argc, | |||||||
|     return true; |     return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void CleanupSharedBarriers(int) |  | ||||||
| { // Here the lock state of named mutexes is unknown, make a hard cleanup
 |  | ||||||
|     osrm::storage::SharedBarriers::resetCurrentRegions(); |  | ||||||
|     osrm::storage::SharedBarriers::resetRegions1(); |  | ||||||
|     osrm::storage::SharedBarriers::resetRegions2(); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| int main(const int argc, const char *argv[]) try | int main(const int argc, const char *argv[]) try | ||||||
| { | { | ||||||
|     int signals[] = {SIGTERM, SIGSEGV, SIGINT, SIGILL, SIGABRT, SIGFPE}; |  | ||||||
|     for (auto sig : signals) |  | ||||||
|     { |  | ||||||
|         std::signal(sig, CleanupSharedBarriers); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     util::LogPolicy::GetInstance().Unmute(); |     util::LogPolicy::GetInstance().Unmute(); | ||||||
| 
 | 
 | ||||||
|     boost::filesystem::path base_path; |     boost::filesystem::path base_path; | ||||||
| @ -151,4 +135,4 @@ catch (const std::bad_alloc &e) | |||||||
|     util::Log(logERROR) << "Please provide more memory or disable locking the virtual " |     util::Log(logERROR) << "Please provide more memory or disable locking the virtual " | ||||||
|                            "address space (note: this makes OSRM swap, i.e. slow)"; |                            "address space (note: this makes OSRM swap, i.e. slow)"; | ||||||
|     return EXIT_FAILURE; |     return EXIT_FAILURE; | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user