mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #22379 im_daemon_life_cycle.test fails on merge of 5.1 -> 5.1-engines
Remove race situations that occur when removing pidfiles. Primarily each process should remove its own pidfile, secondly it should be removed by the process that created it and _only_ if it's certain the process is dead. Third, mysql-test-run.pl will remove the pidfile when process has been killed. - Set state of an instance to STARTING _before_ calling instance->start() - Check that pidfile of instance has been created before changing STARTING => STARTED - Only remove the pidfile if IM kills an instance with SIGKILL, otherwise the instance will remove it itself
This commit is contained in:
@ -377,7 +377,8 @@ pid_t Instance_options::get_pid()
|
||||
{
|
||||
pid_t pid;
|
||||
|
||||
fscanf(pid_file_stream, "%i", &pid);
|
||||
if (fscanf(pid_file_stream, "%i", &pid) != 1)
|
||||
pid= -1;
|
||||
my_fclose(pid_file_stream, MYF(0));
|
||||
return pid;
|
||||
}
|
||||
|
Reference in New Issue
Block a user