mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-06 22:12:47 -05:00
pty backend now supports the changed function interface, so pterm
now compiles and runs again after the major destabilisation. Unfortunately it wasn't feasible to actually encapsulate all of the pty backend's data, since the utmp helper and the need to fork and drop privileges before doing anything else at all rather confuses matters. So the data handle passed around to the pty backend is a null pointer, and the pty backend is just as global-ridden as it always has been. Shame, but such is life. [originally from svn r2128]
This commit is contained in:
@ -886,8 +886,8 @@ void done_with_pty(struct gui_data *inst)
|
||||
gtk_input_remove(inst->master_func_id);
|
||||
}
|
||||
|
||||
if (!inst->exited && back->exitcode() >= 0) {
|
||||
int exitcode = back->exitcode();
|
||||
if (!inst->exited && back->exitcode(backhandle) >= 0) {
|
||||
int exitcode = back->exitcode(backhandle);
|
||||
int clean;
|
||||
|
||||
clean = WIFEXITED(exitcode) && (WEXITSTATUS(exitcode) == 0);
|
||||
@ -938,7 +938,7 @@ gint timer_func(gpointer data)
|
||||
{
|
||||
struct gui_data *inst = (struct gui_data *)data;
|
||||
|
||||
if (back->exitcode() >= 0) {
|
||||
if (back->exitcode(backhandle) >= 0) {
|
||||
/*
|
||||
* The primary child process died. We could keep the
|
||||
* terminal open for remaining subprocesses to output to,
|
||||
@ -1941,7 +1941,7 @@ int main(int argc, char **argv)
|
||||
term = term_init();
|
||||
|
||||
back = &pty_backend;
|
||||
back->init((void *)term, NULL, 0, NULL, 0);
|
||||
back->init((void *)term, &backhandle, NULL, 0, NULL, 0);
|
||||
|
||||
term_size(term, cfg.height, cfg.width, cfg.savelines);
|
||||
ldisc_send(NULL, 0, 0); /* cause ldisc to notice changes */
|
||||
|
Reference in New Issue
Block a user