1 /* $NetBSD: h_simpleserver.c,v 1.3 2011/01/14 13:23:15 pooka Exp $ */
13 #include "../../kernspace/kernspace.h"
15 #define NOFAIL(e) do { int rv = e; if (rv) err(1, #e); } while (/*CONSTCOND*/0)
19 void (*dofun
)(char *);
21 { "sendsig", rumptest_sendsig
},
25 main(int argc
, char *argv
[])
33 NOFAIL(rump_daemonize_begin());
35 NOFAIL(rump_init_server(argv
[1]));
36 NOFAIL(rump_daemonize_done(RUMP_DAEMONIZE_SUCCESS
));
44 for (i
= 0; i
< __arraycount(actions
); i
++) {
45 if (strcmp(actions
[i
].str
, argv
[2]) == 0) {
47 actions
[i
].dofun(arg
);