mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 09:18:08 +02:00
Allow launched background process to work with --allow-remote-control
Use a dedicated socketpair for such processes. Fixes #6712
This commit is contained in:
@@ -5,6 +5,7 @@ package utils
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/seancfoley/ipaddress-go/ipaddr"
|
||||
@@ -37,6 +38,13 @@ func ParseSocketAddress(spec string) (network string, addr string, err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
if network == "fd" {
|
||||
fd := -1
|
||||
if fd, err = strconv.Atoi(addr); err != nil || fd < 0 {
|
||||
err = fmt.Errorf("Not a valid file descriptor number: %#v. Cannot use: %s", addr, spec)
|
||||
}
|
||||
return
|
||||
}
|
||||
err = fmt.Errorf("Unknown network type: %#v in socket address: %s", network, spec)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user