We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 513e433 commit 6dc359bCopy full SHA for 6dc359b
file-api.tex
@@ -652,19 +652,19 @@
652
653
\begin{alltt}
654
close(1);
655
-if((fd = open("out", O\_WRONLY | O\_CREAT | O\_TRUNC, 0666)) == 0)
+if ((fd = open("out", O\_WRONLY | O\_CREAT | O\_TRUNC, 0666)) == 0)
656
dup(0);
657
close(2);
658
dup(1);
659
-if(fd == 0)
+if (fd == 0)
660
close(0);
661
\end{alltt}
662
663
or
664
665
666
fd = open("out", O\_WRONLY | O\_CREAT | O\_TRUNC, 0666);
667
-if(fd != 1) \{
+if (fd != 1) \{
668
dup2(fd, 1);
669
close(fd);
670
\}
0 commit comments