+ signal(SIGALRM, sig_handler);
+ signal(SIGCHLD, sig_handler);
+
+ /* we want these two to interrupt system calls */
+ siginterrupt(SIGALRM, 1);
+ siginterrupt(SIGCHLD, 1);
+
+ memset(&saddr, 0x00, sizeof(saddr));
+ saddr.sun_family = AF_LOCAL;
+ /* use abstract namespace for socket path */
+ strcpy(&saddr.sun_path[1], UDEVD_SOCK_PATH);
+ addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1;
+
+ ssock = socket(AF_LOCAL, SOCK_DGRAM, 0);
+ if (ssock == -1) {
+ dbg("error getting socket");
+ exit(1);
+ }