key-value/kv.c
/**
 * @brief Check if a shared memory object exists
 * @param name Name of the shared memory object
 * @return KV_OK if a shared memory object exists and Non KV_OK otherwise
 */
@brief Check if a shared memory object exists
@param name Name of the shared memory object
@return KV_OK if a shared memory object exists and Non KV_OK otherwise
@brief Check if a shared memory object exists @param name Name of the shared memory object @return KV_OK if a shared memory object exists and Non KV_OK otherwise
static int sm_exists(char *name)
{
    int fd;
    int r = sm_create(&fd, name, O_RDWR, S_IRWXU, false);
    if (r == KV_OK)
        close(fd);
    return r;
}
static int sm_exists ( char * name ) { int fd ; int r = sm_create ( & fd , name , O_RDWR , S_IRWXU , false ) ; if ( r == KV_OK ) close ( fd ) ; return r ; }
@brief Check if a shared memory object exists
 @param name Name of the shared memory object
 @return KV_OK if a shared memory object exists and Non KV_OK otherwise
@brief Check if a shared memory object exists @param name Name of the shared memory object @return KV_OK if a shared memory object exists and Non KV_OK otherwise