mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-06 08:35:26 +02:00
Bug 479241 - [PTY] Output gets cut off after EOF on input
Change-Id: If13b0d977f621e21e7fe89b2b52f07f74858787c Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
This commit is contained in:
parent
9071fbcc8c
commit
5d7ae91e41
1 changed files with 7 additions and 6 deletions
|
@ -72,14 +72,15 @@ public class PTYOutputStream extends OutputStream {
|
|||
public void close() throws IOException {
|
||||
if (master.getFD() == -1)
|
||||
return;
|
||||
// For non-windows platforms, send EOT before closing
|
||||
if (!Platform.OS_WIN32.equals(Platform.getOS())) {
|
||||
write(EOT);
|
||||
}
|
||||
// For non-windows platforms, send EOT instead of closing
|
||||
if (Platform.OS_WIN32.equals(Platform.getOS())) {
|
||||
int status = close0(master.getFD());
|
||||
if (status == -1)
|
||||
throw new IOException("close error"); //$NON-NLS-1$
|
||||
master.setFD(-1);
|
||||
} else {
|
||||
write(EOT);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue