1 /* $NetBSD: h_simplecli.c,v 1.2 2011/01/14 13:23:15 pooka Exp $ */ 2 3 #include <sys/types.h> 4 5 #include <err.h> 6 #include <stdlib.h> 7 #include <stdio.h> 8 #include <unistd.h> 9 10 #include <rump/rump_syscalls.h> 11 #include <rump/rumpclient.h> 12 13 int 14 main(int argc, char *argv[]) 15 { 16 17 if (rumpclient_init() == -1) 18 err(1, "rumpclient init"); 19 20 if (argc > 1) { 21 for (;;) { 22 rump_sys_getpid(); 23 usleep(10000); 24 } 25 } else { 26 if (rump_sys_getpid() > 0) 27 exit(0); 28 err(1, "getpid"); 29 } 30 } 31