Un po' di materiale su {{{splice}}} e inizio della ripulitura degli
[gapil.git] / sources / SharedMem.c
index d4a9b9d7d9d28384f27bbd130552fb7454e3f453..63282d08a006534d8bd929e6d2f6b4c63c9c8174 100644 (file)
  *
  * Author: S. Piccardi
  *
- * $Id: SharedMem.c,v 1.5 2003/02/26 21:37:36 piccardi Exp $
- *
  ***************************************************************/
-#include <sys/shm.h>                  /* SysV IPC shared memory declarations */
-#include <sys/types.h>
+#include <sys/shm.h>      /* SysV IPC shared memory */
+#include <sys/types.h>    /* primitive system data types */
 #include <sys/stat.h>
-#include <stdio.h>                                 /* standard I/O functions */
-#include <fcntl.h>
-#include <signal.h>                          /* signal handling declarations */
-#include <unistd.h>
+#include <stdio.h>        /* standard I/O functions */
+#include <fcntl.h>        /* file control functions */
+#include <signal.h>       /* signal constants, types and functions */
+#include <unistd.h>       /* unix standard library */
 #include <sys/mman.h>
-#include <string.h>
-#include <errno.h>
+#include <string.h>       /* C strings library */
+#include <errno.h>        /* error definitions and routines */
 
 #include "macros.h"
 /* *************************************************************************
@@ -199,6 +197,5 @@ void * FindShm(char * shm_name, off_t shm_size)
  */
 int RemoveShm(char * shm_name)
 {
-    shm_unlink(shm_name);
-    return 0;
+    return shm_unlink(shm_name);
 }