mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[interlink] Test commit. All terminals - slaves.
Before when master terminal quit session, all slave terminal stopped to work. There is a workaround. ELinks on master terminal forks on start and becomes slave.
This commit is contained in:
parent
0c794c2200
commit
08138487a0
@ -515,9 +515,25 @@ int
|
||||
init_interlink(void)
|
||||
{
|
||||
int fd = connect_to_af_unix();
|
||||
int pid;
|
||||
|
||||
if (fd != -1) return fd;
|
||||
|
||||
pid = fork();
|
||||
|
||||
if (pid == -1) return -1;
|
||||
if (pid > 0) {
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= (MAX_BIND_TRIES+2); ++i) {
|
||||
fd = connect_to_af_unix();
|
||||
|
||||
if (fd != -1) return fd;
|
||||
elinks_usleep(BIND_TRIES_DELAY * i);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
close_terminal_pipes();
|
||||
bind_to_af_unix();
|
||||
return -1;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ init(void)
|
||||
handle_trm(get_input_handle(), get_output_handle(),
|
||||
fd, fd, get_ctl_handle(), info.source, info.length,
|
||||
remote_session_flags);
|
||||
} else {
|
||||
} else if (get_cmd_opt_bool("no-connect")) {
|
||||
/* Setup a master terminal */
|
||||
term = attach_terminal(get_input_handle(), get_output_handle(),
|
||||
get_ctl_handle(), info.source, info.length);
|
||||
|
Loading…
Reference in New Issue
Block a user