ftok

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2021 License: MIT Imports: 1 Imported by: 2

README

ftok

PkgGoDev Build Status codecov Go Report Card LICENSE

Package ftok provides a way to generate a System V IPC key, suitable for using with msgget, semget, or shmget.

Get started

Install
go get github.com/hslam/ftok
Import
import "github.com/hslam/ftok"
Usage
Example
package main

import (
	"fmt"
	"github.com/hslam/ftok"
)

func main() {
	key, err := ftok.Ftok("/tmp", 0x22)
	if err != nil {
		return
	}
	fmt.Printf("%x", key)
}
License

This package is licensed under a MIT license (Copyright (c) 2020 Meng Huang)

Author

ftok was written by Meng Huang.

Documentation

Overview

Package ftok provides a way to generate a System V IPC key, suitable for using with msgget, semget, or shmget.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ftok

func Ftok(pathname string, projectid uint8) (int, error)

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL