aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2005-03-12 22:38:49 +0000
committerWarren Dukes <warren.dukes@gmail.com>2005-03-12 22:38:49 +0000
commitaa7b69808626e2d8ff17678fd1d0dc6d1e03ba5a (patch)
tree6cf38f5e7d3886ca219ea59fb5df7874c6724f87 /src/main.c
parent41b5fedaf0cc6b4070dcc0d5a261aaa005dadddf (diff)
downloadmpd-aa7b69808626e2d8ff17678fd1d0dc6d1e03ba5a.tar.gz
mpd-aa7b69808626e2d8ff17678fd1d0dc6d1e03ba5a.tar.xz
mpd-aa7b69808626e2d8ff17678fd1d0dc6d1e03ba5a.zip
*) slight code cleanup
*) now --kill will not check for /proc/<pid>/exe (this is linux specific) git-svn-id: https://svn.musicpd.org/mpd/trunk@3063 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 8cce240d3..cda6d1077 100644
--- a/src/main.c
+++ b/src/main.c
@@ -385,11 +385,11 @@ void cleanUpPidFile() {
}
void killFromPidFile(char * cmd, int killOption) {
+ /*char buf[32];
struct stat st_cmd;
- struct stat st_exe;
+ struct stat st_exe;*/
ConfigParam * pidFileParam = parseConfigFilePath(CONF_PID_FILE, 1);
int pid;
- char buf[32];
FILE * fp = fopen(pidFileParam->value,"r");
if(!fp) {
@@ -405,7 +405,7 @@ void killFromPidFile(char * cmd, int killOption) {
}
fclose(fp);
- memset(buf, 0, 32);
+ /*memset(buf, 0, 32);
snprintf(buf, 31, "/proc/%i/exe", pid);
if(killOption == 1) {
@@ -430,7 +430,7 @@ void killFromPidFile(char * cmd, int killOption) {
cmd, pid);
exit(EXIT_FAILURE);
}
- }
+ }*/
if(kill(pid, SIGTERM)) {
ERROR("unable to kill proccess %i: %s\n", pid, strerror(errno));
@@ -492,9 +492,9 @@ int main(int argc, char * argv[]) {
readPlaylistState();
while(COMMAND_RETURN_KILL!=doIOForInterfaces()) {
+ if(COMMAND_RETURN_KILL==handlePendingSignals()) break;
syncPlayerAndPlaylist();
closeOldInterfaces();
- if(COMMAND_RETURN_KILL==handlePendingSignals()) break;
readDirectoryDBIfUpdateIsFinished();
}