Add a framework for easily and securely using remote control from the main function of a custom kitten

This commit is contained in:
Kovid Goyal
2024-09-29 20:36:12 +05:30
parent 4bb0d3dbfb
commit af83d855de
10 changed files with 219 additions and 29 deletions

View File

@@ -170,7 +170,7 @@ func do_socket_io(io_data *rc_io_data) (serialized_response []byte, err error) {
f := os.NewFile(uintptr(fd), "fd:"+global_options.to_address)
conn, err = net.FileConn(f)
if err != nil {
return nil, err
return nil, fmt.Errorf("Failed to open a socket for the remote control file descriptor: %d with error: %w", fd, err)
}
defer f.Close()
} else {