summaryrefslogtreecommitdiff
path: root/client/mysqladmin.c
diff options
context:
space:
mode:
authorunknown <jani@rhols221.adsl.netsonic.fi>2002-08-22 17:28:51 +0300
committerunknown <jani@rhols221.adsl.netsonic.fi>2002-08-22 17:28:51 +0300
commit0833663fff0d01fe26e997abdd681bd0d512cd11 (patch)
tree429633273d6946d97a93c3bca764a1ff1ed80dc7 /client/mysqladmin.c
parentc75d2c423e3ddc9d7e68b2fa0a3d08517ac326af (diff)
downloadmariadb-git-0833663fff0d01fe26e997abdd681bd0d512cd11.tar.gz
Fixed a bug in mysqladmin when it gave unneccessary warning
in shutdown operation.
Diffstat (limited to 'client/mysqladmin.c')
-rw-r--r--client/mysqladmin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/mysqladmin.c b/client/mysqladmin.c
index 24c9af12892..64b029bc406 100644
--- a/client/mysqladmin.c
+++ b/client/mysqladmin.c
@@ -1121,7 +1121,8 @@ static void wait_pidfile(char *pidfile, time_t last_modified,
(!last_modified || (last_modified == pidfile_status->st_mtime)) &&
(fd= my_open(buff, O_RDONLY, MYF(0))) >= 0)
{
- my_close(fd,MYF(0));
+ if (!my_close(fd,MYF(0)))
+ fd= -1;
sleep(1);
if (last_modified && stat(pidfile, pidfile_status))
last_modified= 0;