aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/fork_posix.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-30 17:47:36 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-30 17:47:36 -0800
commit36522e9f8008cade840b75f53164602719577bc6 (patch)
treedad5fcaa9e6e23923da427fbe36d7dbd6f288ba3 /src/core/lib/iomgr/fork_posix.cc
parentede1b2703d4058578b8b5830f006c89c9216521b (diff)
parent74a53c2440823e7b53741edba883ff1f4fb8f23a (diff)
Merge master after no Extern C changes
Diffstat (limited to 'src/core/lib/iomgr/fork_posix.cc')
-rw-r--r--src/core/lib/iomgr/fork_posix.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/fork_posix.cc b/src/core/lib/iomgr/fork_posix.cc
index 969b7ac670..cc131408af 100644
--- a/src/core/lib/iomgr/fork_posix.cc
+++ b/src/core/lib/iomgr/fork_posix.cc
@@ -80,7 +80,9 @@ void grpc_postfork_child() {
void grpc_fork_handlers_auto_register() {
if (grpc_fork_support_enabled()) {
+#ifdef GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK
pthread_atfork(grpc_prefork, grpc_postfork_parent, grpc_postfork_child);
+#endif // GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK
}
}