- printf("The mapping is at %p.\n", m);
- strcpy(m, "Hello, Mapping!");
+ act.sa_handler = inthandler;
+ act.sa_flags = SA_RESTART;
+
+ /* Only defer ourselves. Also, try to restart interrupted
+ * syscalls to disturb the traced program as little as possible.
+ */
+ result = sigaction(SIGINT, &act, NULL);
+ if(result == -1) {
+ PERROR("sigaction");
+ return -1;
+ }
+
+ return 0;