Index: Makedefs.in
--- Makedefs.in.orig	2012-05-23 01:58:31.000000000 +0200
+++ Makedefs.in	2012-07-28 12:18:15.000000000 +0200
@@ -235,7 +235,6 @@
 # Rules...
 #
 
-.SILENT:
 .SUFFIXES:	.1 .1.gz .1m .1m.gz .3 .3.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .gz
 
 .c.o:
Index: configure
--- configure.orig	2012-07-27 22:57:23.000000000 +0200
+++ configure	2012-07-28 12:17:32.000000000 +0200
@@ -6280,7 +6280,7 @@
 
 if test x$cachedir = x; then
 	if test "x$uname" = xDarwin; then
-		CUPS_CACHEDIR="$localstatedir/spool/cups/cache"
+		CUPS_CACHEDIR="$localstatedir/spool/cache"
 	else
 		CUPS_CACHEDIR="$localstatedir/cache/cups"
 	fi
@@ -6434,9 +6434,9 @@
 
 
 # Longer-term spool data
-CUPS_REQUESTS="$localstatedir/spool/cups"
+CUPS_REQUESTS="$localstatedir/spool"
 cat >>confdefs.h <<_ACEOF
-#define CUPS_REQUESTS "$localstatedir/spool/cups"
+#define CUPS_REQUESTS "$localstatedir/spool"
 _ACEOF
 
 
Index: scheduler/main.c
--- scheduler/main.c.orig	2012-04-23 21:19:19.000000000 +0200
+++ scheduler/main.c	2012-07-28 12:17:32.000000000 +0200
@@ -396,6 +396,25 @@
 
     chdir("/");
 
+   /*
+    * Write PID file
+    */
+#ifdef PID_FILE
+    {
+      mode_t old_umask;
+      pid_t  pid;
+      FILE   *fp;
+
+      old_umask = umask((mode_t) 0022);
+      pid = getpid();
+      if ((fp = fopen(PID_FILE, "w")) == NULL)
+        syslog(LOG_ERR, "cannot write PID file '%s'", PID_FILE);
+      fprintf(fp, "%ld\n", (long)pid);
+      fclose(fp);
+      umask(old_umask);
+    }
+#endif
+
 #ifndef DEBUG
    /*
     * Disable core dumps...
