@@ -13,7 +13,9 @@ Major new features:
Deprecated and removed features, and other changes affecting compatibility:
- [Add deprecations, removals and changes affecting compatibility here]
+* The posix_spawn_file_actions_addchdir and posix_spawn_file_actions_addfchdir
+ functions, added in glibc 2.44 as header redirects to the _np variants, are
+ now exported from libc.so under the GLIBC_2.45 symbol version.
Changes to build and runtime requirements:
@@ -29,6 +29,10 @@ 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)
@@ -317,6 +317,7 @@ tests := \
tst-rxspencer-no-utf8 \
tst-sched_getaffinity \
tst-spawn-chdir \
+ tst-spawn-chdir-posix \
tst-spawn4 \
tst-spawn5 \
tst-spawn6 \
@@ -159,6 +159,10 @@ libc {
GLIBC_2.35 {
posix_spawn_file_actions_addtcsetpgrp_np;
}
+ GLIBC_2.45 {
+ posix_spawn_file_actions_addchdir;
+ posix_spawn_file_actions_addfchdir;
+ }
GLIBC_PRIVATE {
__libc_fork; __libc_pread; __libc_pwrite;
__nanosleep_nocancel; __pause_nocancel;
@@ -200,17 +200,31 @@ extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *
int __fd, int __newfd)
__THROW __nonnull ((1));
-#ifdef __USE_MISC
+#ifdef __USE_XOPEN2K24XSI
/* Add an action changing the directory to PATH during spawn. This
affects the subsequent file actions. */
-extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *
- __restrict __actions,
- const char *__restrict __path)
+extern int posix_spawn_file_actions_addchdir (posix_spawn_file_actions_t *
+ __restrict __actions,
+ const char *__restrict __path)
__THROW __nonnull ((1, 2));
/* 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. */
+extern int posix_spawn_file_actions_addfchdir (posix_spawn_file_actions_t *,
+ int __fd)
+ __THROW __nonnull ((1));
+
+#endif /* __USE_XOPEN2K24XSI */
+
+#ifdef __USE_MISC
+/* Same as posix_spawn_file_actions_addchdir. */
+extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *
+ __restrict __actions,
+ const char *__restrict __path)
+ __THROW __nonnull ((1, 2));
+
+/* Same as posix_spawn_file_actions_addfchdir. */
extern int posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *,
int __fd)
__THROW __nonnull ((1));
@@ -23,8 +23,8 @@
#include "spawn_int.h"
int
-posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *file_actions,
- const char *path)
+__posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *file_actions,
+ const char *path)
{
struct __spawn_action *rec;
@@ -51,3 +51,7 @@ posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *file_actions,
return 0;
}
+weak_alias (__posix_spawn_file_actions_addchdir_np,
+ posix_spawn_file_actions_addchdir_np)
+weak_alias (__posix_spawn_file_actions_addchdir_np,
+ posix_spawn_file_actions_addchdir)
@@ -23,8 +23,8 @@
#include "spawn_int.h"
int
-posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *actions,
- int fd)
+__posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *actions,
+ int fd)
{
struct __spawn_action *rec;
@@ -44,3 +44,7 @@ posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *actions,
return 0;
}
+weak_alias (__posix_spawn_file_actions_addfchdir_np,
+ posix_spawn_file_actions_addfchdir_np)
+weak_alias (__posix_spawn_file_actions_addfchdir_np,
+ posix_spawn_file_actions_addfchdir)
new file mode 100644
@@ -0,0 +1,2 @@
+#define USE_POSIX
+#include "tst-spawn-chdir.c"
@@ -78,12 +78,20 @@ 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
+ TEST_COMPARE (posix_spawn_file_actions_addfchdir (actions, tmpfd), 0);
+#else
TEST_COMPARE (posix_spawn_file_actions_addfchdir_np
(actions, tmpfd), 0);
+#endif
TEST_COMPARE (posix_spawn_file_actions_addclose (actions, tmpfd), 0);
}
else
+#ifdef USE_POSIX
+ TEST_COMPARE (posix_spawn_file_actions_addchdir (actions, path), 0);
+#else
TEST_COMPARE (posix_spawn_file_actions_addchdir_np (actions, path), 0);
+#endif
}
static int
@@ -727,7 +727,7 @@ GLIBC_2.2.6 _libc_intl_domainname D 0x5
GLIBC_2.2.6 _longjmp F
GLIBC_2.2.6 _mcleanup F
GLIBC_2.2.6 _mcount F
-GLIBC_2.2.6 _nl_default_dirname D 0xe
+GLIBC_2.2.6 _nl_default_dirname D 0x12
GLIBC_2.2.6 _nl_domain_bindings D 0x4
GLIBC_2.2.6 _nl_msg_cat_cntr D 0x4
GLIBC_2.2.6 _null_auth D 0xc
@@ -2835,6 +2835,8 @@ GLIBC_2.44 timer_delete F
GLIBC_2.44 timer_getoverrun F
GLIBC_2.44 timer_gettime F
GLIBC_2.44 timer_settime F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -611,7 +611,7 @@ GLIBC_2.38 _libc_intl_domainname D 0x5
GLIBC_2.38 _longjmp F
GLIBC_2.38 _mcleanup F
GLIBC_2.38 _mcount F
-GLIBC_2.38 _nl_default_dirname D 0xe
+GLIBC_2.38 _nl_default_dirname D 0x12
GLIBC_2.38 _nl_domain_bindings D 0x8
GLIBC_2.38 _nl_msg_cat_cntr D 0x4
GLIBC_2.38 _obstack_allocated_p F
@@ -2511,6 +2511,8 @@ GLIBC_2.44 timer_delete F
GLIBC_2.44 timer_getoverrun F
GLIBC_2.44 timer_gettime F
GLIBC_2.44 timer_settime F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
HURD_CTHREADS_0.3 __mutex_init F
HURD_CTHREADS_0.3 __mutex_lock F
HURD_CTHREADS_0.3 __mutex_trylock F
@@ -2775,3 +2775,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -3122,6 +3122,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2536,3 +2536,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -2828,6 +2828,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2825,6 +2825,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2812,3 +2812,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -2849,6 +2849,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -3032,6 +3032,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2287,3 +2287,5 @@ GLIBC_2.44 wprintf F
GLIBC_2.44 write F
GLIBC_2.44 writev F
GLIBC_2.44 wscanf F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -2296,3 +2296,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -2808,6 +2808,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2975,6 +2975,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2861,3 +2861,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -2858,3 +2858,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -2938,6 +2938,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2936,6 +2936,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2944,6 +2944,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2846,6 +2846,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2286,3 +2286,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -3165,6 +3165,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -3210,6 +3210,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2919,6 +2919,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2995,3 +2995,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -2539,3 +2539,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -2739,3 +2739,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
@@ -2956,6 +2956,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2855,6 +2855,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2852,6 +2852,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -3186,6 +3186,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2822,6 +2822,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2771,6 +2771,8 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
@@ -2790,3 +2790,5 @@ GLIBC_2.43 memset_explicit F
GLIBC_2.43 mseal F
GLIBC_2.43 openat2 F
GLIBC_2.43 umaxabs F
+GLIBC_2.45 posix_spawn_file_actions_addchdir F
+GLIBC_2.45 posix_spawn_file_actions_addfchdir F