- /* start our event dispatcher and register for signals */
- dispatch_startup();
- dispatch_register(Event_Signal, signal_handler, NULL);
-
- /* set up signal handler */
- sigemptyset(&sigset);
- action.sa_handler = dispatch_signal;
- action.sa_mask = sigset;
- action.sa_flags = SA_NOCLDSTOP | SA_NODEFER;
- sigaction(SIGUSR1, &action, (struct sigaction *) NULL);
- sigaction(SIGPIPE, &action, (struct sigaction *) NULL);
-/* sigaction(SIGSEGV, &action, (struct sigaction *) NULL);*/
- sigaction(SIGFPE, &action, (struct sigaction *) NULL);
- sigaction(SIGTERM, &action, (struct sigaction *) NULL);
- sigaction(SIGINT, &action, (struct sigaction *) NULL);
- sigaction(SIGHUP, &action, (struct sigaction *) NULL);
-
- /* create the ~/.openbox dir */
- path = g_build_filename(g_get_home_dir(), ".openbox", NULL);
- mkdir(path, (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP |
- S_IROTH | S_IWOTH | S_IXOTH));
- g_free(path);
- /* create the ~/.openbox/themes dir */
- path = g_build_filename(g_get_home_dir(), ".openbox", "themes", NULL);
- mkdir(path, (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP |
- S_IROTH | S_IWOTH | S_IXOTH));
- g_free(path);
- /* create the ~/.openbox/sessions dir */
- path = g_build_filename(g_get_home_dir(), ".openbox", "sessions", NULL);
- mkdir(path, (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP |
- S_IROTH | S_IWOTH | S_IXOTH));
- g_free(path);
-