|  | @@ -45,6 +45,9 @@ typedef struct grpc_combiner grpc_combiner;
 | 
	
		
			
				|  |  |  /* The exec_ctx's thread is (potentially) owned by a call or channel: care
 | 
	
		
			
				|  |  |     should be given to not delete said call/channel from this exec_ctx */
 | 
	
		
			
				|  |  |  #define GRPC_EXEC_CTX_FLAG_THREAD_RESOURCE_LOOP 2
 | 
	
		
			
				|  |  | +/* This exec ctx was initialized by an internal thread, and should not
 | 
	
		
			
				|  |  | +   be counted by fork handlers */
 | 
	
		
			
				|  |  | +#define GRPC_EXEC_CTX_FLAG_IS_INTERNAL_THREAD 4
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  extern grpc_closure_scheduler* grpc_schedule_on_exec_ctx;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -93,7 +96,9 @@ class ExecCtx {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    /** Parameterised Constructor */
 | 
	
		
			
				|  |  |    ExecCtx(uintptr_t fl) : flags_(fl) {
 | 
	
		
			
				|  |  | -    grpc_core::Fork::IncExecCtxCount();
 | 
	
		
			
				|  |  | +    if (!(GRPC_EXEC_CTX_FLAG_IS_INTERNAL_THREAD & flags_)) {
 | 
	
		
			
				|  |  | +      grpc_core::Fork::IncExecCtxCount();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |      Set(this);
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -102,7 +107,9 @@ class ExecCtx {
 | 
	
		
			
				|  |  |      flags_ |= GRPC_EXEC_CTX_FLAG_IS_FINISHED;
 | 
	
		
			
				|  |  |      Flush();
 | 
	
		
			
				|  |  |      Set(last_exec_ctx_);
 | 
	
		
			
				|  |  | -    grpc_core::Fork::DecExecCtxCount();
 | 
	
		
			
				|  |  | +    if (!(GRPC_EXEC_CTX_FLAG_IS_INTERNAL_THREAD & flags_)) {
 | 
	
		
			
				|  |  | +      grpc_core::Fork::DecExecCtxCount();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    /** Disallow copy and assignment operators */
 |