summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qprocess/testForwardingHelper/main.cpp
blob: 3ed5ae7360ef77288ab260365f99aac0f34e74ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include <fstream>
#include <stdio.h>

int main(int argc, char *argv[])
{
    if (argc < 2) {
        puts("Usage: testForwardingHelper <doneFilePath>");
        return 1;
    }
    fputs("out data", stdout);
    fflush(stdout);
    fputs("err data", stderr);
    fflush(stderr);
    std::ofstream out(argv[1]);
    out << "That's all folks!";
    return 0;
}