version 1.592, 2023/07/17 05:41:53 |
version 1.593, 2023/07/26 23:06:00 |
|
|
* Flag indicating that the current process should be backgrounded and |
* Flag indicating that the current process should be backgrounded and |
* a new mux-client launched in the foreground for ControlPersist. |
* a new mux-client launched in the foreground for ControlPersist. |
*/ |
*/ |
int need_controlpersist_detach = 0; |
static int need_controlpersist_detach = 0; |
|
|
/* Copies of flags for ControlPersist foreground mux-client */ |
/* Copies of flags for ControlPersist foreground mux-client */ |
int ostdin_null_flag, osession_type, otty_flag, orequest_tty; |
static int ostdin_null_flag, osession_type, otty_flag, orequest_tty; |
|
static int ofork_after_authentication; |
|
|
/* |
/* |
* General data structure for command line options and options configurable |
* General data structure for command line options and options configurable |
|
|
/* Child: master process continues mainloop */ |
/* Child: master process continues mainloop */ |
break; |
break; |
default: |
default: |
/* Parent: set up mux client to connect to backgrounded master */ |
/* |
|
* Parent: set up mux client to connect to backgrounded |
|
* master. |
|
*/ |
debug2_f("background process is %ld", (long)pid); |
debug2_f("background process is %ld", (long)pid); |
options.stdin_null = ostdin_null_flag; |
options.stdin_null = ostdin_null_flag; |
options.request_tty = orequest_tty; |
options.request_tty = orequest_tty; |
tty_flag = otty_flag; |
tty_flag = otty_flag; |
|
options.fork_after_authentication = ofork_after_authentication; |
options.session_type = osession_type; |
options.session_type = osession_type; |
close(muxserver_sock); |
close(muxserver_sock); |
muxserver_sock = -1; |
muxserver_sock = -1; |
|
|
osession_type = options.session_type; |
osession_type = options.session_type; |
orequest_tty = options.request_tty; |
orequest_tty = options.request_tty; |
otty_flag = tty_flag; |
otty_flag = tty_flag; |
|
ofork_after_authentication = options.fork_after_authentication; |
options.stdin_null = 1; |
options.stdin_null = 1; |
options.session_type = SESSION_TYPE_NONE; |
options.session_type = SESSION_TYPE_NONE; |
tty_flag = 0; |
tty_flag = 0; |
if (!options.fork_after_authentication && |
if ((osession_type != SESSION_TYPE_NONE || |
(osession_type != SESSION_TYPE_NONE || |
|
options.stdio_forward_host != NULL)) |
options.stdio_forward_host != NULL)) |
need_controlpersist_detach = 1; |
need_controlpersist_detach = 1; |
options.fork_after_authentication = 1; |
options.fork_after_authentication = 1; |