chiark / gitweb /
Context menu for playlist picker
[disorder] / disobedience / rtp.c
index faf2c6116cc4a51a88f1f7f7379ee5094f0223d9..cbedb18aaf8eb4f07b0675f64a6f22df31cf39b9 100644 (file)
@@ -2,20 +2,18 @@
  * This file is part of Disobedience
  * Copyright (C) 2007 Richard Kettlewell
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 /** @file disobedience/rtp.c
  * @brief RTP player support for Disobedience
@@ -109,30 +107,30 @@ void start_rtp(void) {
   /* double-fork so we don't have to wait() later */
   if(!(pid = xfork())) {
     if(setsid() < 0)
-      fatal(errno, "error calling setsid");
+      disorder_fatal(errno, "error calling setsid");
     if(!(pid = xfork())) {
       /* grandchild */
       exitfn = _exit;
       /* log errors and output somewhere reasonably sane.  rtp_running()
        * will have made sure the directory exists. */
       if((fd = open(rtp_log, O_WRONLY|O_CREAT|O_TRUNC, 0600)) < 0)
-       fatal(errno, "creating %s", rtp_log);
+       disorder_fatal(errno, "creating %s", rtp_log);
       if(dup2(fd, 1) < 0
         || dup2(fd, 2) < 0)
-       fatal(errno, "dup2");
+       disorder_fatal(errno, "dup2");
       if(close(fd) < 0)
-       fatal(errno, "close");
+       disorder_fatal(errno, "close");
       /* We don't want to hang onto whatever stdin was */
       if((fd = open("/dev/null", O_RDONLY)) < 0)
-        fatal(errno, "opening /dev/null");
+        disorder_fatal(errno, "opening /dev/null");
       if(dup2(fd, 0) < 0)
-        fatal(errno, "dup2");
+        disorder_fatal(errno, "dup2");
       if(close(fd) < 0)
-       fatal(errno, "close");
+       disorder_fatal(errno, "close");
       /* execute the player */
       execlp("disorder-playrtp",
             "disorder-playrtp", "--socket", rtp_socket, (char *)0);
-      fatal(errno, "disorder-playrtp");
+      disorder_fatal(errno, "disorder-playrtp");
     } else {
       /* child */
       _exit(0);