public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: libc-stable@sourceware.org
Subject: [COMMITTED 2.28 2/7] support: Pass environ to child process
Date: Wed, 14 Apr 2021 11:51:13 +0530	[thread overview]
Message-ID: <20210414062118.1411358-2-siddhesh@sourceware.org> (raw)
In-Reply-To: <20210414062118.1411358-1-siddhesh@sourceware.org>

Pass environ to posix_spawn so that the child process can inherit
environment of the test.

(cherry picked from commit e958490f8c74e660bd93c128b3bea746e268f3f6)
---
 support/support_subprocess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/support_subprocess.c b/support/support_subprocess.c
index 0c8cc6af30..9e02ed747a 100644
--- a/support/support_subprocess.c
+++ b/support/support_subprocess.c
@@ -84,7 +84,7 @@ support_subprogram (const char *file, char *const argv[])
   xposix_spawn_file_actions_addclose (&fa, result.stdout_pipe[1]);
   xposix_spawn_file_actions_addclose (&fa, result.stderr_pipe[1]);
 
-  result.pid = xposix_spawn (file, &fa, NULL, argv, NULL);
+  result.pid = xposix_spawn (file, &fa, NULL, argv, environ);
 
   xclose (result.stdout_pipe[1]);
   xclose (result.stderr_pipe[1]);
-- 
2.29.2


  reply	other threads:[~2021-04-14  6:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14  6:21 [COMMITTED 2.28 1/7] support: Add support_capture_subprogram Siddhesh Poyarekar
2021-04-14  6:21 ` Siddhesh Poyarekar [this message]
2021-04-14  6:21 ` [COMMITTED 2.28 3/7] support: Typo and formatting fixes Siddhesh Poyarekar
2021-04-14  6:21 ` [COMMITTED 2.28 4/7] support: Add capability to fork an sgid child Siddhesh Poyarekar
2021-04-14  6:21 ` [COMMITTED 2.28 5/7] tst-env-setuid: Use support_capture_subprogram_self_sgid Siddhesh Poyarekar
2021-04-14  6:21 ` [COMMITTED 2.28 6/7] Enhance setuid-tunables test Siddhesh Poyarekar
2021-04-14  6:21 ` [COMMITTED 2.28 7/7] Fix SXID_ERASE behavior in setuid programs (BZ #27471) Siddhesh Poyarekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210414062118.1411358-2-siddhesh@sourceware.org \
    --to=siddhesh@sourceware.org \
    --cc=libc-stable@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).