Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahgraham committed Dec 18, 2024
1 parent 73ba67c commit 78147fd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,18 @@ public synchronized void close() throws IOException {
}
boolean res;

res = ConPTYKernel32.INSTANCE.CloseHandle(handles.processInformation.hThread);
checkErr(res, "CloseHandle processInformation.hThread"); //$NON-NLS-1$
if (handles.processInformation != null) {
res = ConPTYKernel32.INSTANCE.CloseHandle(handles.processInformation.hThread);
checkErr(res, "CloseHandle processInformation.hThread"); //$NON-NLS-1$

res = ConPTYKernel32.INSTANCE.CloseHandle(handles.processInformation.hProcess);
checkErr(res, "CloseHandle processInformation.hProcess"); //$NON-NLS-1$
res = ConPTYKernel32.INSTANCE.CloseHandle(handles.processInformation.hProcess);
checkErr(res, "CloseHandle processInformation.hProcess"); //$NON-NLS-1$
}

ConPTYKernel32.INSTANCE.DeleteProcThreadAttributeList(handles.startupInfo.lpAttributeList);
handles.threadAttributeListMemory.clear();
if (handles.startupInfo != null) {
ConPTYKernel32.INSTANCE.DeleteProcThreadAttributeList(handles.startupInfo.lpAttributeList);
handles.threadAttributeListMemory.clear();
}

ConPTYKernel32.INSTANCE.ClosePseudoConsole(handles.pseudoConsole.getValue());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,4 @@ protected void finalize() throws IOException {
private native int read0(int fd, byte[] buf, int len) throws IOException;

private native int close0(int fd) throws IOException;

static {
System.loadLibrary("pty"); //$NON-NLS-1$
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,4 @@ protected void finalize() throws IOException {
private native int write0(int fd, byte[] b, int len) throws IOException;

private native int close0(int fd) throws IOException;

static {
System.loadLibrary("pty"); //$NON-NLS-1$
}

}

0 comments on commit 78147fd

Please sign in to comment.