glib/glib/tests/test-spawn-sleep.c
Marc-André Lureau 2ebe30e170 tests: fix spawn-multithreaded on win32
Add test-spawn-sleep helper program to sleep on Windows (child-test
removed in commit 241b9f41b, probably breaking the test)

(fwiw, Windows has a timeout command nowadays, but it conflicts with
msys2 timeout which has different usage)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-02-22 23:55:55 +04:00

33 lines
1.1 KiB
C

/*
* Copyright (C) 2022 Red Hat, Inc.
*
* This work is provided "as is"; redistribution and modification
* in whole or in part, in any medium, physical or electronic is
* permitted without restriction.
*
* This work is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* In no event shall the authors or contributors be liable for any
* direct, indirect, incidental, special, exemplary, or consequential
* damages (including, but not limited to, procurement of substitute
* goods or services; loss of use, data, or profits; or business
* interruption) however caused and on any theory of liability, whether
* in contract, strict liability, or tort (including negligence or
* otherwise) arising in any way out of the use of this software, even
* if advised of the possibility of such damage.
*/
#include "config.h"
#include <stdlib.h>
#include "glib.h"
int
main (int argc,
char *argv[])
{
g_usleep (atoi (argv[1]) * G_USEC_PER_SEC);
return 0;
}