Skip to content

Commit 5b34ab6

Browse files
committed
sshd server to avoid closing child handle if already closed
was causing exception in debugger otherwise.
1 parent 138ce33 commit 5b34ab6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

serverloop.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,11 +885,12 @@ collect_children(void)
885885
char *inittermseq = "\033[20l\033[?7h\0" ; // no LFtoCRLF no AUTOWRAPON
886886
Channel *c=channel_by_id ( s->chanid );
887887
buffer_append(&c->input, inittermseq, strlen(inittermseq));
888-
channel_output_poll();
888+
packet_write_poll();
889889
}
890890
session_close_by_pid(s->pid, status);
891891

892-
CloseHandle(process);
892+
if (s->pid)
893+
CloseHandle(process);
893894
int WSHELPDelChildToWatch (HANDLE processtowatch);
894895
WSHELPDelChildToWatch (process); // take the process off from watch list in select mux
895896
}

0 commit comments

Comments
 (0)