summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorunknown <rburnett@build.mysql.com>2004-10-06 21:46:44 +0200
committerunknown <rburnett@build.mysql.com>2004-10-06 21:46:44 +0200
commit10cd526ded91311fbb183510d54363c481cd997f (patch)
treedee33782b05a1b0a614d51b3702ff2866a315a1c /sql/mysqld.cc
parente82d3d49342f4be222252f22b7f8cb7399baec6f (diff)
downloadmariadb-git-10cd526ded91311fbb183510d54363c481cd997f.tar.gz
Enabled the writing of a pid file on Windows.
mysqld.cc: Added call to create_pid_file to start_signal_handler on windows. Also removed the #ifndef WINDOWS from two calls that deletes the pid file sql/mysqld.cc: Added call to create_pid_file to start_signal_handler on windows. Also removed the #ifndef WINDOWS from two calls that deletes the pid file
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 5e40398574b..5242eca2521 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -963,7 +963,7 @@ void clean_up(bool print_message)
if (print_message && errmesg)
sql_print_information(ER(ER_SHUTDOWN_COMPLETE),my_progname);
-#if !defined(__WIN__) && !defined(EMBEDDED_LIBRARY)
+#if !defined(EMBEDDED_LIBRARY)
if (!opt_bootstrap)
(void) my_delete(pidfile_name,MYF(0)); // This may not always exist
#endif
@@ -1500,7 +1500,11 @@ static void init_signals(void)
}
static void start_signal_handler(void)
-{}
+{
+ // Save vm id of this process
+ if (!opt_bootstrap)
+ create_pid_file();
+}
static void check_data_home(const char *path)
{}
@@ -2934,10 +2938,10 @@ we force server id to 2, but this MySQL server will not act as a slave.");
#ifndef __NETWARE__
(void) pthread_kill(signal_thread, MYSQL_KILL_SIGNAL);
#endif /* __NETWARE__ */
-#ifndef __WIN__
+
if (!opt_bootstrap)
(void) my_delete(pidfile_name,MYF(MY_WME)); // Not needed anymore
-#endif
+
if (unix_sock != INVALID_SOCKET)
unlink(mysqld_unix_port);
exit(1);