Bug #5704 --pidfile option doesn't work on Windows
Submitted: 22 Sep 2004 15:37 Modified: 20 Oct 2004 16:26
Reporter: Mark Matthews Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:Any OS:Windows (Windows)
Assigned to: Reggie Burnett CPU Architecture:Any

[22 Sep 2004 15:37] Mark Matthews
The MySQL server has no way to report the pid it is running as (yes, PIDs _do_ exist on Windows) when it is launched on Windows. This makes it hard for programs that wrap MySQL (such as Connector/MXJ and the C port of the testsuite) to shut down a running MySQL instance in a consistent way compared to unix.

It appears in the sources that the --pidfile code (but not the option handling itself, adding --pid-file to the mysqld command line silently fails :( ) is #ifdef'd out, even though Windows has a function _very_ similar to Unix's getPid() (in fact it has the same name):


How to repeat:
Start the server on windows with the --pid-file option. Notice that it doesn't write a pidfile, but neither does it complain :(
[20 Oct 2004 16:26] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Reviewed by Brian.