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


#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>

int main()
{
    struct sigaction noaction;
    memset(&noaction, 0, sizeof(noaction));
    noaction.sa_handler = SIG_IGN;
    ::sigaction(SIGTERM, &noaction, 0);

    printf("Ready\n");
    fflush(stdout);

    for (int i = 0; i < 5; ++i)
        sleep(1);
    return 0;
}