]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/testbackend.c
Fix backend logging from signal handlers (OpenPrinting #167)
[thirdparty/cups.git] / backend / testbackend.c
index 6dbd0abee691651678b3ca330e9cddec835a3c1f..6412a022b766fbda099b681d9d25150d1ca306f0 100644 (file)
@@ -19,6 +19,7 @@
 #include <fcntl.h>
 #include <sys/wait.h>
 #include <signal.h>
+#include "backend-private.h"
 
 
 /*
@@ -395,7 +396,7 @@ main(int  argc,                             /* I - Number of command-line args */
          data = ps_data;
 
         write(1, data, strlen(data));
-       write(2, "DEBUG: START\n", 13);
+       backendMessage("DEBUG: START\n");
        timeout = 60.0;
         while ((bytes = cupsBackChannelRead(buffer, sizeof(buffer),
                                            timeout)) > 0)
@@ -403,7 +404,7 @@ main(int  argc,                             /* I - Number of command-line args */
          write(2, buffer, (size_t)bytes);
          timeout = 5.0;
        }
-       write(2, "\nDEBUG: END\n", 12);
+       backendMessage("\nDEBUG: END\n");
       }
 
       exit(0);