Debugger: PseudoTerminal, do not close the handle while app is still debugged.

git-svn-id: trunk@60469 -
This commit is contained in:
martin 2019-02-20 15:45:45 +00:00
parent 80360508ab
commit d3130df900

View File

@ -199,8 +199,8 @@ procedure TPseudoConsoleDlg.DoClose(var CloseAction: TCloseAction);
begin
{$IFDEF DBG_ENABLE_TERMINAL}
if integer(ttyHandle) >= 0 then begin
FileClose(ttyHandle);
ttyHandle := handleUnopened
//(ttyHandle);
// := handleUnopened
end;
{$ENDIF DBG_ENABLE_TERMINAL}
inherited DoClose(CloseAction);
@ -320,10 +320,11 @@ begin
(* handle it immediately. MarkMLl (so you know who to kick). *)
if fpioctl(ttyHandle, TIOCSWINSZ, @winSize) < 0 then begin
fileclose(ttyHandle);
//fileclose(ttyHandle);
DebugLn(DBG_WARNINGS, ['TPseudoConsoleDlg.AddOutput Write failed, closed handle']);
ttyHandle := THandle(-1) (* Attempted ioctl() failed *)
end;
//ttyHandle := THandle(-1) (* Attempted ioctl() failed *)
end
else
if integer(ttyHandle) >= 0 then begin (* Handle not closed by error *)
{$IFDEF SEND_EXPLICIT_SIGNAL }
{$WARNING TPseudoConsoleDlg.consoleSizeChanged: Explicit signal untested }