mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 07:55:10 +02:00
Add openbsd and dragonfly support to shm
This commit is contained in:
21
tools/utils/shm/specific_openbsd.go
Normal file
21
tools/utils/shm/specific_openbsd.go
Normal file
@@ -0,0 +1,21 @@
|
||||
// License: GPLv3 Copyright: 2022, Kovid Goyal, <kovid at kovidgoyal.net>
|
||||
|
||||
package shm
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
|
||||
const SHM_DIR = "/tmp"
|
||||
|
||||
func modify_pattern(pattern string) string {
|
||||
// https://github.com/openbsd/src/blob/master/lib/libc/gen/shm_open.c
|
||||
if strings.Contains(pattern, "*") {
|
||||
pattern += ".shm"
|
||||
} else {
|
||||
pattern += "*.shm"
|
||||
}
|
||||
return pattern
|
||||
}
|
||||
Reference in New Issue
Block a user