2 #include <mach/mach_error.h>
3 #include <servers/bootstrap.h>
9 #include <dispatch/dispatch.h>
11 #include "hello_logger.h"
12 #include "hello_loggerServer.h"
14 static mach_port_t
checkin_or_register(char *bname
);
18 mach_port_t mp
= checkin_or_register(HELLO_LOGGER_BOOTSTRAP_NAME
);
19 dispatch_source_t ds
= dispatch_source_mig_new(mp
, do_hello_logger_subsystem
.maxsize
, hello_logger_server
, NULL
, NULL
, NULL
);
29 do_example(mach_port_t test_port
__attribute__((unused
)), string_t somestring
)
31 fprintf(stdout
, "%s\n", somestring
);
37 checkin_or_register(char *bname
)
42 /* If we're started by launchd or the old mach_init */
43 kr
= bootstrap_check_in(bootstrap_port
, bname
, &mp
);
44 if (kr
== KERN_SUCCESS
)