~earboxer/osk0-wvkbd-wrapper

917cc22a087b1888a0fe8fb40caba07ac5a8fe9e — Zach DeCook 9 months ago 05dc45a zachster
dbus_request_name: don't spin
1 files changed, 3 insertions(+), 2 deletions(-)

M dbus_request_name.c
M dbus_request_name.c => dbus_request_name.c +3 -2
@@ 1,12 1,13 @@
#include <dbus/dbus.h>
#include <unistd.h>

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

	if (argc != 2) return 1;

	DBusError error = DBUS_ERROR_INIT;
	DBusConnection *conn = dbus_bus_get (DBUS_BUS_SESSION, &error);
	int number = dbus_bus_request_name(conn, argv[1], 0, &error);
	for(;;){}
	for(;;){sleep(255);}
	return 0;
}