Re: [PATCH 1/2] Revert "posix: Add POSIX aliases to some spawn functions" (BZ 34437)
"Andreas K. Huettel" <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Organization | Gentoo Linux |
| Message-ID | <[email protected]> |
Am Montag, 31. August 2026, 18:09:36 Mitteleuropäische Sommerzeit schrieb Adhemerval Zanella: > This reverts commit 7594b4e5a75d41e891782aa7e3fb51924f6840cb. Reviewed-by: Andreas K. Huettel <[email protected]> * is an exact revert * affects only headers and tests, so backportable > --- > conform/data/spawn.h-data | 4 ---- > posix/Makefile | 1 - > posix/spawn.h | 20 -------------------- > posix/tst-spawn-chdir-posix.c | 2 -- > posix/tst-spawn-chdir.c | 19 +++---------------- > 5 files changed, 3 insertions(+), 43 deletions(-) > delete mode 100644 posix/tst-spawn-chdir-posix.c > > diff --git a/conform/data/spawn.h-data b/conform/data/spawn.h-data > index 1f332324c2..43aa9cb8ae 100644 > --- a/conform/data/spawn.h-data > +++ b/conform/data/spawn.h-data > @@ -29,10 +29,6 @@ function int posix_spawnattr_setpgroup (posix_spawnattr_t*, pid_t) > function int posix_spawnattr_setschedparam (posix_spawnattr_t*, const struct sched_param*) > function int posix_spawnattr_setschedpolicy (posix_spawnattr_t*, int) > function int posix_spawnattr_setsigmask (posix_spawnattr_t*, const sigset_t*) > -#if defined XOPEN2K24 || defined POSIX2024 > -function int posix_spawn_file_actions_addchdir (posix_spawn_file_actions_t*, const char *) > -function int posix_spawn_file_actions_addfchdir (posix_spawn_file_actions_t*, int) > -#endif > function int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t*, int) > function int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t*, int, int) > function int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t*, int, const char *, int, mode_t) > diff --git a/posix/Makefile b/posix/Makefile > index ae26443ac9..b2fc897455 100644 > --- a/posix/Makefile > +++ b/posix/Makefile > @@ -317,7 +317,6 @@ tests := \ > tst-rxspencer-no-utf8 \ > tst-sched_getaffinity \ > tst-spawn-chdir \ > - tst-spawn-chdir-posix \ > tst-spawn4 \ > tst-spawn5 \ > tst-spawn6 \ > diff --git a/posix/spawn.h b/posix/spawn.h > index 0aabf5ebef..5e68752a66 100644 > --- a/posix/spawn.h > +++ b/posix/spawn.h > @@ -200,26 +200,6 @@ extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t * > int __fd, int __newfd) > __THROW __nonnull ((1)); > > -#ifdef __USE_XOPEN2K24XSI > - > -/* Add an action changing the directory to PATH during spawn. This > - affects the subsequent file actions. > - Alias of posix_spawn_file_actions_addchdir_np. */ > -extern int __REDIRECT_NTH (posix_spawn_file_actions_addchdir, > - (posix_spawn_file_actions_t * __restrict __actions, > - const char *__restrict __path), > - posix_spawn_file_actions_addchdir_np); > - > -/* Add an action changing the directory to FD during spawn. This > - affects the subsequent file actions. FD is not duplicated and must > - be open when the file action is executed. > - Alias of posix_spawn_file_actions_addfchdir_np. */ > -extern int __REDIRECT_NTH (posix_spawn_file_actions_addfchdir, > - (posix_spawn_file_actions_t *, int __fd), > - posix_spawn_file_actions_addfchdir_np); > - > -#endif /* __USE_XOPEN2K24XSI */ > - > #ifdef __USE_MISC > /* Add an action changing the directory to PATH during spawn. This > affects the subsequent file actions. */ > diff --git a/posix/tst-spawn-chdir-posix.c b/posix/tst-spawn-chdir-posix.c > deleted file mode 100644 > index 3f8d8952bb..0000000000 > --- a/posix/tst-spawn-chdir-posix.c > +++ /dev/null > @@ -1,2 +0,0 @@ > -#define USE_POSIX_ALIASES > -#include "tst-spawn-chdir.c" > diff --git a/posix/tst-spawn-chdir.c b/posix/tst-spawn-chdir.c > index 166f835492..a3478d61f6 100644 > --- a/posix/tst-spawn-chdir.c > +++ b/posix/tst-spawn-chdir.c > @@ -78,25 +78,12 @@ add_chdir (posix_spawn_file_actions_t *actions, const char *path, > { > TEST_COMPARE (posix_spawn_file_actions_addopen > (actions, tmpfd, path, O_DIRECTORY | O_RDONLY, 0), 0); > - > -#ifdef USE_POSIX_ALIASES > - int ret = posix_spawn_file_actions_addfchdir (actions, tmpfd); > -#else > - int ret = posix_spawn_file_actions_addfchdir_np (actions, tmpfd); > -#endif > - TEST_COMPARE (ret, 0); > - > + TEST_COMPARE (posix_spawn_file_actions_addfchdir_np > + (actions, tmpfd), 0); > TEST_COMPARE (posix_spawn_file_actions_addclose (actions, tmpfd), 0); > } > else > - { > -#ifdef USE_POSIX_ALIASES > - int ret = posix_spawn_file_actions_addchdir (actions, path); > -#else > - int ret = posix_spawn_file_actions_addchdir_np (actions, path); > -#endif > - TEST_COMPARE (ret, 0); > - } > + TEST_COMPARE (posix_spawn_file_actions_addchdir_np (actions, path), 0); > } > > static int > -- PD Dr. Andreas K. Hüttel [email protected] Gentoo Linux developer (council, comrel, toolchain, base-system, perl, libreoffice) https://wiki.gentoo.org/wiki/User:Dilfridge
signature.asc
(application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEE/Rnm0xsZLuTcY+rT3CsWIV7VQSoFAmqWyuMbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJENwrFiFe1UEqB1AP/1Ac4AOWo8CmddLoid5e gvhhYsfxJMAy+O5Xf27ZfIsEoFFpwq+5WCrMTYqFr7U91M1YjsQt0Cqwgx3d7ElW +ABZ8DIQM7Ob1si6PodCo/h8aVboEh1U1hVU0ITtEKgcOmqGKtKX6SPM4rEJt18Y vFl0d6hgQbQv+PYyVdDOf85I4zDURppf+gUjDUF6vngeqrVx95K5MzGyIKW1gBDG DMh0zUjS5Qkej1TYbHFrzoRK8m3x/BaD/3TgOnKjj63pDBMQYuLThXKmKceV7qDN Fn2ArmrmWctZFe15NKxgaxDmukd6K+qagbx1/Ant/XSZMZ4v+/UQIW0WyKHl193b W7hqECBpA8oM/mWJ52F3A1ysSvHVbSDZykLeXiO779ciQ3s3Q76xQMUJyBwWYNMa Ey/SSv38fXhEzXoBwR6ahNcUk1Yu1jWeBuak+nUZz0tgacMZRUD2qIEJWSSn+KST rA7VuV2A5/nnMn/PkzXAj6TU29Ya0Q7vpkAJEmF7rk+jGPj2Y91tApj5uwJ05U0L e7BXJy9sKWNR+iYWfyyW3z+8zb5q/iX8i3tYMofJ65YmUTaePJU1u9jZSVUNwsRf I2P4vpgGEdVe4d7SK2+1LalFnfi3Vo8M4ddIbjevAy4c96oQTJ1gXzxqLRcgKsbl BgC3qMdyiVvxjHLA8oe1jLPA =iXFa -----END PGP SIGNATURE-----