libminijail: Block child sync for all configuration.
am: 2d69add25d
Change-Id: I7aa941d4a7a3f199f77954d11f62c3b9eee3fec0
diff --git a/libminijail.c b/libminijail.c
index 482d6bd..ee9b9a0 100644
--- a/libminijail.c
+++ b/libminijail.c
@@ -2673,11 +2673,12 @@
}
/*
- * If we want to set up a new uid/gid map in the user namespace,
- * or if we need to add the child process to cgroups, create the pipe(2)
- * to sync between parent and child.
+ * If the parent process needs to configure the child's runtime
+ * environment after forking, create a pipe(2) to block the child until
+ * configuration is done.
*/
- if (j->flags.userns || j->flags.cgroups) {
+ if (j->flags.forward_signals || j->flags.pid_file || j->flags.cgroups ||
+ j->rlimit_count || j->flags.userns) {
sync_child = 1;
if (pipe(child_sync_pipe_fds))
return -EFAULT;