diff options
author | unknown <rburnett@build.mysql.com> | 2004-10-06 21:46:44 +0200 |
---|---|---|
committer | unknown <rburnett@build.mysql.com> | 2004-10-06 21:46:44 +0200 |
commit | 0a843a7d81edc7038316bd02ce1e02bfee91612f (patch) | |
tree | dee33782b05a1b0a614d51b3702ff2866a315a1c /sql | |
parent | 258e68ad1a953af8c1218b1456bde08db6a9622f (diff) | |
download | mariadb-git-0a843a7d81edc7038316bd02ce1e02bfee91612f.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')
-rw-r--r-- | sql/mysqld.cc | 12 |
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); |