in src/com/pty4j/unix/Pty.java [186:212]
public void close() throws IOException {
if (myMaster != -1) {
synchronized (myFDLock) {
if (myMaster != -1) {
int fd = myMaster;
myMaster = -1;
int status = close0(fd);
if (status == -1) {
throw new IOException("Close error");
}
}
}
}
if (mySlaveFD != -1) {
synchronized (myFDLock) {
if (mySlaveFD != -1) {
int fd = mySlaveFD;
mySlaveFD = -1;
int status = CLibrary.close(fd);
if (status == -1) {
throw new IOException("Close error");
}
}
}
}
}