Risistemati ed insiriti nella relativa sezione gli esempi di uso dei
[gapil.git] / listati / HandSigInt.c
diff --git a/listati/HandSigInt.c b/listati/HandSigInt.c
new file mode 100644 (file)
index 0000000..3212934
--- /dev/null
@@ -0,0 +1,6 @@
+void HandSigInt(int sig)
+{
+    if (RemoveShm(shmname) != 0) perror("Cannot remove shared memory");
+    if (sem_unlink(semname)!= 0) perror("Cannot remove semaphore") ;
+    exit(0);
+}