9 * Starts the given application with the given args.
12 void start_application(const char *path, const char *args) {
14 if ((pid = vfork()) == 0) {
15 /* This is the child */
17 /* TODO: For now, we ignore args. Later on, they should be parsed
18 correctly (like in the shell?) */
19 argv[0] = strdup(path);
21 execve(path, argv, environment);
27 * Checks a generic cookie for errors and quits with the given message if there
31 void check_error(xcb_connection_t *connection, xcb_void_cookie_t cookie, char *err_message) {
32 xcb_generic_error_t *error = xcb_request_check(connection, cookie);
34 fprintf(stderr, "ERROR: %s : %d\n", err_message , error->error_code);
35 xcb_disconnect(connection);