mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
New facility, platform_start_subprocess.
We already have the ability to start a subprocess and hook it up to a Socket, for running local proxy commands. Now the same facility is available as an auxiliary feature, so that a backend can start another subcommand for a different purpose, and make a separate Socket to communicate with it. Just like the local proxy system, this facility captures the subprocess's stderr, and passes it back to the caller via plug_log. To make that not look silly, I had to add a system where the "proxy:" prefix on the usual plug_log messages is reconfigurable, and when you call platform_start_subprocess(), you get to pass the prefix you want to use in this case.
This commit is contained in:
@ -371,6 +371,13 @@ void setup_fd_socket(Socket *s, int infd, int outfd, int inerrfd)
|
||||
queue_toplevel_callback(fdsocket_connect_success_callback, fds);
|
||||
}
|
||||
|
||||
void fd_socket_set_psb_prefix(Socket *s, const char *prefix)
|
||||
{
|
||||
FdSocket *fds = container_of(s, FdSocket, sock);
|
||||
assert(fds->sock.vt == &FdSocket_sockvt);
|
||||
psb_set_prefix(&fds->psb, prefix);
|
||||
}
|
||||
|
||||
static FdSocket *make_fd_socket_internal(SockAddr *addr, int port, Plug *plug)
|
||||
{
|
||||
FdSocket *fds;
|
||||
|
Reference in New Issue
Block a user