summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-sound/mt-daapd/files/mt-daapd-0.2.4.1-pidfile.patch
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-sound/mt-daapd/files/mt-daapd-0.2.4.1-pidfile.patch')
-rw-r--r--media-sound/mt-daapd/files/mt-daapd-0.2.4.1-pidfile.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/media-sound/mt-daapd/files/mt-daapd-0.2.4.1-pidfile.patch b/media-sound/mt-daapd/files/mt-daapd-0.2.4.1-pidfile.patch
new file mode 100644
index 000000000000..5976316e5bf2
--- /dev/null
+++ b/media-sound/mt-daapd/files/mt-daapd-0.2.4.1-pidfile.patch
@@ -0,0 +1,50 @@
+diff -ur mt-daapd-0.2.4.1.orig/src/main.c mt-daapd-0.2.4.1/src/main.c
+--- mt-daapd-0.2.4.1.orig/src/main.c 2007-10-22 02:27:57.000000000 +0300
++++ mt-daapd-0.2.4.1/src/main.c 2007-10-28 23:54:29.000000000 +0200
+@@ -551,6 +551,7 @@
+ printf(" -m Disable mDNS\n");
+ printf(" -c <file> Use configfile specified\n");
+ printf(" -p Parse playlist file\n");
++ printf(" -P <file> Write the PID to specified file\n");
+ printf(" -f Run in foreground\n");
+ printf(" -y Yes, go ahead and run as non-root user\n");
+ printf("\n\n");
+@@ -708,6 +709,7 @@
+ int main(int argc, char *argv[]) {
+ int option;
+ char *configfile=DEFAULT_CONFIGFILE;
++ char *pidfile=PIDFILE;
+ WSCONFIG ws_config;
+ WSHANDLE server;
+ int parseonly=0;
+@@ -726,7 +728,7 @@
+ config.use_mdns=1;
+ err_debuglevel=1;
+
+- while((option=getopt(argc,argv,"D:d:c:mpfry")) != -1) {
++ while((option=getopt(argc,argv,"D:d:c:mpP:fry")) != -1) {
+ switch(option) {
+ case 'd':
+ err_debuglevel=atoi(optarg);
+@@ -754,6 +756,10 @@
+ foreground=1;
+ break;
+
++ case 'P':
++ pidfile=optarg;
++ break;
++
+ case 'r':
+ reload=1;
+ break;
+@@ -803,8 +809,8 @@
+
+ /* open the pidfile, so it can be written once we detach */
+ if((!foreground) && (!force_non_root)) {
+- if(-1 == (pid_fd = open(PIDFILE,O_CREAT | O_WRONLY | O_TRUNC, 0644)))
+- DPRINTF(E_FATAL,L_MAIN,"Error opening pidfile (%s): %s\n",PIDFILE,strerror(errno));
++ if(-1 == (pid_fd = open(pidfile,O_CREAT | O_WRONLY | O_TRUNC, 0644)))
++ DPRINTF(E_FATAL,L_MAIN,"Error opening pidfile (%s): %s\n",pidfile,strerror(errno));
+
+ if(0 == (pid_fp = fdopen(pid_fd, "w")))
+ DPRINTF(E_FATAL,L_MAIN,"fdopen: %s\n",strerror(errno));