Files
kitty/tools/utils/file_at_fd_darwin.go
Kovid Goyal ca7388c145 Bloody lazy Crapple
No mknodat. Sigh.
2026-04-24 14:22:41 +05:30

22 lines
318 B
Go

package utils
import (
"fmt"
"os"
"path/filepath"
"golang.org/x/sys/unix"
)
var _ = fmt.Print
func mknodAt(parent *os.File, name string, mode uint32, dev int) (err error) {
path := filepath.Join(parent.Name(), name)
for {
if err = unix.Mknod(path, mode, dev); err != unix.EINTR {
break
}
}
return
}