+ sc = initscope();
+ if (sc == NULL) {
+ printf("Scope not found!\n");
+ exit(EXIT_FAILURE);
+ }
+
+ bzero(&act, sizeof(act));
+ act.sa_handler = sighandler;
+ act.sa_flags = SA_RESTART;
+ if (sigaction(SIGPIPE, &act, NULL) == -1) {
+ perror("sigaction");
+ exit(EXIT_FAILURE);
+ }
+
+ bzero(&act, sizeof(act));
+ act.sa_handler = sighandler;
+ if (sigaction(SIGALRM, &act, NULL) == -1) {
+ perror("sigaction");
+ exit(EXIT_FAILURE);
+ }