summaryrefslogtreecommitdiff
path: root/filter/imagetoraster.c
diff options
context:
space:
mode:
Diffstat (limited to 'filter/imagetoraster.c')
-rw-r--r--filter/imagetoraster.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/filter/imagetoraster.c b/filter/imagetoraster.c
index c57275b7a..16b49707f 100644
--- a/filter/imagetoraster.c
+++ b/filter/imagetoraster.c
@@ -241,8 +241,7 @@ main(int argc, /* I - Number of command-line arguments */
* Child process for pstoraster... Assign new pipe input to pstoraster...
*/
- close(0);
- dup(mypipes[0]);
+ dup2(mypipes[0], 0);
close(mypipes[0]);
close(mypipes[1]);
@@ -265,8 +264,7 @@ main(int argc, /* I - Number of command-line arguments */
* Update stdout so it points at the new pstoraster...
*/
- close(1);
- dup(mypipes[1]);
+ dup2(mypipes[1], 1);
close(mypipes[0]);
close(mypipes[1]);