about summary refs log tree commit diff
path: root/htl/pt-testcancel.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-04-09 20:55:45 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-04-14 11:21:49 +0530
commitb790d1c116b3a2fbf3cec2fa96ba7638fa3caee3 (patch)
tree2250dba94d6935fc6adcc227813b8213cc3c6ccf /htl/pt-testcancel.c
parentd79d7e13ba3526d8d9b90821afc36877242a5bd7 (diff)
downloadglibc-b790d1c116b3a2fbf3cec2fa96ba7638fa3caee3.tar.gz
glibc-b790d1c116b3a2fbf3cec2fa96ba7638fa3caee3.tar.xz
glibc-b790d1c116b3a2fbf3cec2fa96ba7638fa3caee3.zip
support: Add capability to fork an sgid child
Add a new function support_capture_subprogram_self_sgid that spawns an
sgid child of the running program with its own image and returns the
exit code of the child process.  This functionality is used by at
least three tests in the testsuite at the moment, so it makes sense to
consolidate.

There is also a new function support_subprogram_wait which should
provide simple system() like functionality that does not set up file
actions.  This is useful in cases where only the return code of the
spawned subprocess is interesting.

This patch also ports tst-secure-getenv to this new function.  A
subsequent patch will port other tests.  This also brings an important
change to tst-secure-getenv behaviour.  Now instead of succeeding, the
test fails as UNSUPPORTED if it is unable to spawn a setgid child,
which is how it should have been in the first place.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>

(cherry picked from commit 716a3bdc41b2b4b864dc64475015ba51e35e1273)
Diffstat (limited to 'htl/pt-testcancel.c')
0 files changed, 0 insertions, 0 deletions