mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 20:00:27 +02:00
Debugger: PseudoTerminal, do not close the handle while app is still debugged.
git-svn-id: trunk@60469 -
This commit is contained in:
parent
80360508ab
commit
d3130df900
@ -199,8 +199,8 @@ procedure TPseudoConsoleDlg.DoClose(var CloseAction: TCloseAction);
|
|||||||
begin
|
begin
|
||||||
{$IFDEF DBG_ENABLE_TERMINAL}
|
{$IFDEF DBG_ENABLE_TERMINAL}
|
||||||
if integer(ttyHandle) >= 0 then begin
|
if integer(ttyHandle) >= 0 then begin
|
||||||
FileClose(ttyHandle);
|
//(ttyHandle);
|
||||||
ttyHandle := handleUnopened
|
// := handleUnopened
|
||||||
end;
|
end;
|
||||||
{$ENDIF DBG_ENABLE_TERMINAL}
|
{$ENDIF DBG_ENABLE_TERMINAL}
|
||||||
inherited DoClose(CloseAction);
|
inherited DoClose(CloseAction);
|
||||||
@ -320,10 +320,11 @@ begin
|
|||||||
(* handle it immediately. MarkMLl (so you know who to kick). *)
|
(* handle it immediately. MarkMLl (so you know who to kick). *)
|
||||||
|
|
||||||
if fpioctl(ttyHandle, TIOCSWINSZ, @winSize) < 0 then begin
|
if fpioctl(ttyHandle, TIOCSWINSZ, @winSize) < 0 then begin
|
||||||
fileclose(ttyHandle);
|
//fileclose(ttyHandle);
|
||||||
DebugLn(DBG_WARNINGS, ['TPseudoConsoleDlg.AddOutput Write failed, closed handle']);
|
DebugLn(DBG_WARNINGS, ['TPseudoConsoleDlg.AddOutput Write failed, closed handle']);
|
||||||
ttyHandle := THandle(-1) (* Attempted ioctl() failed *)
|
//ttyHandle := THandle(-1) (* Attempted ioctl() failed *)
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
if integer(ttyHandle) >= 0 then begin (* Handle not closed by error *)
|
if integer(ttyHandle) >= 0 then begin (* Handle not closed by error *)
|
||||||
{$IFDEF SEND_EXPLICIT_SIGNAL }
|
{$IFDEF SEND_EXPLICIT_SIGNAL }
|
||||||
{$WARNING TPseudoConsoleDlg.consoleSizeChanged: Explicit signal untested }
|
{$WARNING TPseudoConsoleDlg.consoleSizeChanged: Explicit signal untested }
|
||||||
|
Loading…
Reference in New Issue
Block a user