mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 05:24:20 +02:00
22 lines
318 B
Go
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
|
|
}
|