Skip to content

Commit

Permalink
Hang in PreClose method during dup2 system call
Browse files Browse the repository at this point in the history
During fcntl, dup2 system calls if read/write happens then PreClose method gets hang. This issue is not seen if we Signal/Kill the thread first and then call the preClose method.

Signed-off-by: Shruthi.Shruthi1 <Shruthi.Shruthi1@ibm.com>
  • Loading branch information
shruacha1234 committed Jan 5, 2023
1 parent a8becd5 commit 7bf6291
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ protected void implCloseSelectableChannel() throws IOException {
assert state == ST_CLOSING;
long th = thread;
if (th != 0) {
nd.preClose(fd);
NativeThread.signal(th);
nd.preClose(fd);

// wait for read operation to end
while (thread != 0) {
Expand Down

0 comments on commit 7bf6291

Please sign in to comment.