src/java.base/unix/native/libjava/childproc.c
changeset 55240 57b93b113ec0
parent 55218 412ce076c0dc
child 55753 b9798272720b
--- a/src/java.base/unix/native/libjava/childproc.c	Wed Jun 05 14:07:14 2019 -0400
+++ b/src/java.base/unix/native/libjava/childproc.c	Wed Jun 05 09:12:45 2019 +0200
@@ -315,6 +315,13 @@
     const ChildStuff* p = (const ChildStuff*) arg;
     int fail_pipe_fd = p->fail[1];
 
+    if (p->sendAlivePing) {
+        /* Child shall signal aliveness to parent at the very first
+         * moment. */
+        int code = CHILD_IS_ALIVE;
+        restartableWrite(fail_pipe_fd, &code, sizeof(code));
+    }
+
     /* Close the parent sides of the pipes.
        Closing pipe fds here is redundant, since closeDescriptors()
        would do it anyways, but a little paranoia is a good thing. */