summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager/instance.cc
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-09-26 15:44:52 +0200
committerunknown <msvensson@neptunus.(none)>2006-09-26 15:44:52 +0200
commitbde596273895f1fbc3b880f9b63205151f314a46 (patch)
tree4873375551473eb0229f96d345e78cc623a9c714 /server-tools/instance-manager/instance.cc
parentc490d7ab02f1c9829846724258750ca46db8e704 (diff)
parentf91b91cf659118eaf74b077f900a4bfd3405ed7d (diff)
downloadmariadb-git-bde596273895f1fbc3b880f9b63205151f314a46.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/bug22379_runtime/my50-bug22379_runtime
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-runtime server-tools/instance-manager/instance.cc: Auto merged
Diffstat (limited to 'server-tools/instance-manager/instance.cc')
-rw-r--r--server-tools/instance-manager/instance.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc
index 2ed369ba245..b792d132da0 100644
--- a/server-tools/instance-manager/instance.cc
+++ b/server-tools/instance-manager/instance.cc
@@ -572,18 +572,19 @@ void Instance::kill_instance(int signum)
/* if there are no pid, everything seems to be fine */
if ((pid= options.get_pid()) != 0) /* get pid from pidfile */
{
- /*
- If we cannot kill mysqld, then it has propably crashed.
- Let us try to remove staled pidfile and return successfully
- as mysqld is probably stopped.
- */
- if (!kill(pid, signum))
- options.unlink_pidfile();
- else if (signum == SIGKILL) /* really killed instance with SIGKILL */
- log_error("The instance %s is being stopped forsibly. Normally \
- it should not happed. Probably the instance has been \
- hanging. You should also check your IM setup",
- options.instance_name);
+ if (kill(pid, signum) == 0)
+ {
+ /* Kill suceeded */
+ if (signum == SIGKILL) /* really killed instance with SIGKILL */
+ {
+ log_error("The instance %s is being stopped forcibly. Normally" \
+ "it should not happen. Probably the instance has been" \
+ "hanging. You should also check your IM setup",
+ options.instance_name);
+ /* After sucessful hard kill the pidfile need to be removed */
+ options.unlink_pidfile();
+ }
+ }
}
return;
}