1
0
mirror of https://github.com/hslam/ipc.git synced 2025-04-26 13:49:17 +08:00
hslam_ipc/ftok.go
2020-11-29 04:42:18 +08:00

16 lines
491 B
Go

// Copyright (c) 2020 Meng Huang (mhboy@outlook.com)
// This package is licensed under a MIT license that can be found in the LICENSE file.
package ipc
import (
"github.com/hslam/ftok"
)
// Ftok uses the given pathname (which must refer to an existing, accessible file) and
// the least significant 8 bits of proj_id (which must be nonzero) to generate
// a key_t type System V IPC key.
func Ftok(pathname string, projectid uint8) (int, error) {
return ftok.Ftok(pathname, projectid)
}