aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-04-15 05:07:04 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-04-15 05:07:04 +0000
commit7f29bb1a8d2eb5edc4e3ea50223370dd4ba4a96c (patch)
tree8d7850f7f6d786d8f4e7dfab0e4695e3ffef2938 /src/main.c
parentdf3af7d4f121be6264c0ce307f4a75e844d7282c (diff)
downloadmpd-7f29bb1a8d2eb5edc4e3ea50223370dd4ba4a96c.tar.gz
mpd-7f29bb1a8d2eb5edc4e3ea50223370dd4ba4a96c.tar.xz
mpd-7f29bb1a8d2eb5edc4e3ea50223370dd4ba4a96c.zip
log cycling and a few cleanups
git-svn-id: https://svn.musicpd.org/mpd/trunk@772 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/main.c b/src/main.c
index 69560dbf3..944c1af76 100644
--- a/src/main.c
+++ b/src/main.c
@@ -356,31 +356,19 @@ int main(int argc, char * argv[]) {
exit(EXIT_FAILURE);
}
- if(close(STDOUT_FILENO)) {
- fprintf(err,"problems closing stdout : %s\n",
- strerror(errno));
- exit(EXIT_FAILURE);
- }
-
- if(close(STDERR_FILENO)) {
- fprintf(err,"problems closing stderr : %s\n",
- strerror(errno));
- exit(EXIT_FAILURE);
- }
-
if(dup2(fileno(out),STDOUT_FILENO)<0) {
- fprintf(err,"problems dup2 stdout : %s\n",
+ myfprintf(err,"problems dup2 stdout : %s\n",
strerror(errno));
exit(EXIT_FAILURE);
}
if(dup2(fileno(err),STDERR_FILENO)<0) {
- fprintf(err,"problems dup2 stderr : %s\n",
+ myfprintf(err,"problems dup2 stderr : %s\n",
strerror(errno));
exit(EXIT_FAILURE);
}
- myfprintfStdLogMode(out,err);
+ myfprintfStdLogMode(out,err,options.logFile,options.errorFile);
fflush(NULL);
pid = fork();