From b1764f8226260d5b58958d613c7654f01e624dca Mon Sep 17 00:00:00 2001
From: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
Date: Mon, 3 Jun 2024 16:49:46 +0800
Subject: [PATCH] Fix a performance regression while using large number of
 environment variables

Resolves: RHEL-20020
Signed-off-by: Siteshwar Vashisht <svashisht@redhat.com>
---
 execute_cmd.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/execute_cmd.c b/execute_cmd.c
index 71d147c..2e33722 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -5482,11 +5482,7 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
     {
       /* If we're optimizing out the fork (implicit `exec'), decrement the
 	 shell level like `exec' would do. */
-#if 0 /* TAG: bash-5.2 psmith 10/11/2020 */
       if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE && (subshell_environment & SUBSHELL_PIPE) == 0)
-#else
-      if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE)
-#endif
 	adjust_shell_level (-1);
 
       maybe_make_export_env ();
-- 
2.33.0

