summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/loopback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/corelib/io/qprocess/testProcessLoopback/loopback.cpp')
-rw-r--r--tests/benchmarks/corelib/io/qprocess/testProcessLoopback/loopback.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/loopback.cpp b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/loopback.cpp
new file mode 100644
index 0000000000..1f47f6b0f1
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/loopback.cpp
@@ -0,0 +1,19 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+
+#include <stdio.h>
+
+int main()
+{
+ char buffer[1024];
+ for (;;) {
+ size_t num = fread(buffer, 1, sizeof(buffer), stdin);
+ if (num <= 0)
+ break;
+ fwrite(buffer, num, 1, stdout);
+ fflush(stdout);
+ }
+
+ return 0;
+}