summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/rump/rumpkern/h_client/h_simplecli.c
blob: 11f432c38aad71819823eef42950596c24573a42 (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
25
26
27
28
29
30
/*	$NetBSD: h_simplecli.c,v 1.2 2011/01/14 13:23:15 pooka Exp $	*/

#include <sys/types.h>

#include <err.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

#include <rump/rump_syscalls.h>
#include <rump/rumpclient.h>

int
main(int argc, char *argv[])
{

	if (rumpclient_init() == -1)
		err(1, "rumpclient init");

	if (argc > 1) {
		for (;;) {
			rump_sys_getpid();
			usleep(10000);
		}
	} else {
		if (rump_sys_getpid() > 0)
			exit(0);
		err(1, "getpid");
	}
}
OpenPOWER on IntegriCloud