2
0
Эх сурвалжийг харах

Try to sleep after the piping

Just to give windows enough time to output something
rexim 4 жил өмнө
parent
commit
f9beb1c709
1 өөрчлөгдсөн 6 нэмэгдсэн , 2 устгасан
  1. 6 2
      examples/pipe.c

+ 6 - 2
examples/pipe.c

@@ -7,10 +7,14 @@ int main(void)
           CHAIN_CMD(PATH("tools", "rot13"))//,
           // CHAIN_CMD(PATH("tools", "hex")),
           // OUT("output.txt")
-          );
+         );
     // CMD(PATH("tools", "cat"), "output.txt");
 
-    // sleep(1);
+#ifdef _WIN32
+    Sleep(1000);
+#else
+    sleep(1);
+#endif
 
     return 0;
 }