mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
IM port fixes: fix crash on startup, add more error checking, get rid of unnecessary code.
server-tools/instance-manager/commands.cc: fix memory leak server-tools/instance-manager/guardian.cc: don't check pthread_mutex_lock/unlock return value, as it never returns error if properly used (no self deadlocks) and initialized server-tools/instance-manager/guardian.h: prototype fixed server-tools/instance-manager/instance_map.cc: don't check pthread_mutex_lock/unlock status, as it never returns error if properly used (no self deadlocks) and initialized server-tools/instance-manager/instance_map.h: prototype fixed server-tools/instance-manager/listener.cc: initialize highest-numbered descriptor to 0 for select before setting it with max(n, sockets[i]), ifdef unix-specific code server-tools/instance-manager/manager.cc: remove commented stuff server-tools/instance-manager/options.cc: fix crash in load_defaults, which happened on all Unix systems due to const char *Options::config_file= NULL. Check return value for GetModuleFileName. Get rid of obscure default_config_file[FN_REFLEN]= "/etc/my.cnf"; which was never used
This commit is contained in:
@ -424,23 +424,13 @@ int Guardian_thread::stop_instances(bool stop_instances_arg)
|
||||
}
|
||||
|
||||
|
||||
int Guardian_thread::lock()
|
||||
void Guardian_thread::lock()
|
||||
{
|
||||
#ifdef __WIN__
|
||||
pthread_mutex_lock(&LOCK_guardian);
|
||||
return 0;
|
||||
#else
|
||||
return pthread_mutex_lock(&LOCK_guardian);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int Guardian_thread::unlock()
|
||||
void Guardian_thread::unlock()
|
||||
{
|
||||
#ifdef __WIN__
|
||||
pthread_mutex_unlock(&LOCK_guardian);
|
||||
return 0;
|
||||
#else
|
||||
return pthread_mutex_unlock(&LOCK_guardian);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user