X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=blobdiff_plain;f=listati%2FHandSigInt.c;fp=listati%2FHandSigInt.c;h=321293476a680c451a40154542e790d526bf92be;hb=9fc37da8fe691ce7ca6222773aace47c5edef3d1;hp=0000000000000000000000000000000000000000;hpb=5b56553e2294af812321ffaea6b296d2ad068f41;p=gapil.git diff --git a/listati/HandSigInt.c b/listati/HandSigInt.c new file mode 100644 index 0000000..3212934 --- /dev/null +++ b/listati/HandSigInt.c @@ -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); +}