some more informations:
ps -A|grep pandora_server
nothing returns: pandora server is not running, OK.
pandora_server start
Pandora Server 1.2 Beta 3 Build PS060929 Copyright (c) 2004-2006 ArticaST
This program is Free Software, licensed under the terms of GPL License v2 or later.
You can download latest versions and documentation at
http://pandora.sourceforge.net.
[W] It is not a good idea running Pandora Server as root user, please DON'T DO IT!
- Server basepath is /opt/pandora/pandora_server
- Server logfile at /opt/pandora/pandora_server/log/pandora_server.log
- Server errorlogfile at /opt/pandora/pandora_server/log/pandora_server.error
- Server incoming directory at /opt/pandora/pandora_server/data_in
- Server keepalive 60
- Server threshold 10
- You are running Pandora Data Server.
- This server is running in MASTER mode.
Pandora Data Server is now running with PID 15637
I run it as root, because it's conveniant for me at that time.
then:
ps -A|grep pandora_server
15636 ? 00:00:00 pandora_server.
15637 ? 00:00:00 pandora_server.
cat var/pandora_server.pid
15637
/opt/pandora/pandora_server/pandora_server stop
Stopping Pandora Data Server
ps -A|grep pandora_server
15636 ? 00:00:00 pandora_server.
15637 ? 00:00:00 pandora_server. <defunct>
and I must kill the FIRST instance (15636) to make it stop running.
So, my fix will be:
in the start/stop sh script (pandora_server), line 30 replace tail -1 by head -1.
So now the first process ID is in the .pid file, and the stop parameter kills the right process and the server is then stopped.
But may be useful to check something else than the .pid file to ensure that the server is running or not, for that reason:
with the original start/stop script, when I'm starting the server it creates 2 processes, memorises the PID of the second in the .pid file. good.
when I try to stop the server with the original script, it checks the .pid file, and try to kill the process whiwh PID was in the .pid file. then it doesn't check if it is still running or not, and issues a message indicating that server is stopped, and deletes the .pid file...
And then if I start the server again with the original script, the .pid file doesn't exist, so it launches the server, creating 2 more instances... and never verifies how many processes are running or zombie, etc...
So, I will try to fix this
bye for now