]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/testlpd.c
Import changes from CUPS 1.4svn-r8704.
[thirdparty/cups.git] / scheduler / testlpd.c
index e7527339de85fe8ee2108f3362c1b024d32701cb..43221b897dc497cc5fcf8589ab830615422e3ee9 100644 (file)
@@ -145,13 +145,11 @@ main(int  argc,                           /* I - Number of command-line arguments */
     * Child goes here...
     */
 
-    close(0);
-    dup(cupslpd_stdin[0]);
+    dup2(cupslpd_stdin[0], 0);
     close(cupslpd_stdin[0]);
     close(cupslpd_stdin[1]);
 
-    close(1);
-    dup(cupslpd_stdout[1]);
+    dup2(cupslpd_stdout[1], 1);
     close(cupslpd_stdout[0]);
     close(cupslpd_stdout[1]);