Skip to content

Commit aa91c16

Browse files
sync jattach sources, prevent jattach from waiting for a dead process
1 parent 5bf0e31 commit aa91c16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jattach/jattach_hotspot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static int start_attach_mechanism(int pid, int nspid) {
6363
do {
6464
nanosleep(&ts, NULL);
6565
result = check_socket(nspid);
66-
} while (result != 0 && (ts.tv_nsec += 20000000) < 500000000);
66+
} while (result != 0 && (ts.tv_nsec += 20000000) < 500000000 && kill(pid, 0) == 0);
6767

6868
unlink(path);
6969
return result;

0 commit comments

Comments
 (0)