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