zhangmeng
2019-08-26 3bd1f29975c0eaa6af8c99776b099faafbbfc250
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2016 Tom Thorogood. All rights reserved.
// Use of this source code is governed by a
// Modified BSD License license that can be found in
// the LICENSE file.
 
package shm
 
import "github.com/tmthrgd/go-shm"
 
// Unlink removes the previously created blocker.
//
// Taken from shm_unlink(3):
//     The  operation  of shm_unlink() is analogous to unlink(2): it removes a
//     shared memory object name, and, once all processes  have  unmapped  the
//     object, de-allocates and destroys the contents of the associated memory
//     region.  After a successful shm_unlink(),  attempts  to  shm_open()  an
//     object  with  the same name will fail (unless O_CREAT was specified, in
//     which case a new, distinct object is created).
func Unlink(name string) error {
    return shm.Unlink(name)
}