< prev index next >
src/java.base/unix/native/libjava/childproc.c
Print this page
rev 54932 : [mq]: 8223777-posix_spawn-no-exec-error-alternate-impl
@@ -312,10 +312,17 @@
int
childProcess(void *arg)
{
const ChildStuff* p = (const ChildStuff*) arg;
+ if (p->sendAlivePing) {
+ /* Child shall signal aliveness to parent at the very first
+ * moment. */
+ int code = CHILD_IS_ALIVE;
+ restartableWrite(p->fail[1], &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. */
if ((closeSafely(p->in[1]) == -1) ||
(closeSafely(p->out[0]) == -1) ||
< prev index next >