]> sourceware.org Git - glibc.git/commitdiff
posix: New function posix_spawn_file_actions_addchdir_np [BZ #17405]
authorFlorian Weimer <fweimer@redhat.com>
Tue, 6 Nov 2018 15:08:12 +0000 (16:08 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 6 Nov 2018 15:08:12 +0000 (16:08 +0100)
38 files changed:
ChangeLog
NEWS
posix/Makefile
posix/Versions
posix/spawn.h
posix/spawn_faction_addchdir.c [new file with mode: 0644]
posix/spawn_faction_destroy.c
posix/spawn_int.h
posix/tst-spawn-chdir.c [new file with mode: 0644]
sysdeps/mach/hurd/i386/libc.abilist
sysdeps/posix/spawni.c
sysdeps/unix/sysv/linux/aarch64/libc.abilist
sysdeps/unix/sysv/linux/alpha/libc.abilist
sysdeps/unix/sysv/linux/arm/libc.abilist
sysdeps/unix/sysv/linux/hppa/libc.abilist
sysdeps/unix/sysv/linux/i386/libc.abilist
sysdeps/unix/sysv/linux/ia64/libc.abilist
sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
sysdeps/unix/sysv/linux/microblaze/libc.abilist
sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
sysdeps/unix/sysv/linux/nios2/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
sysdeps/unix/sysv/linux/sh/libc.abilist
sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
sysdeps/unix/sysv/linux/spawni.c
sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist

index d64838bc04afefd6b7b11e9aa7a90c20f15d7c9b..9b8f6f2db928d162cd72484bbd73fd49ca8b6b56 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,72 @@
+2018-11-06  Florian Weimer  <fweimer@redhat.com>
+
+       [BZ #17405]
+       * posix/Makefile (routines): Add spawn_faction_addchdir.
+       (tests): Add tst-spawn-chdir.
+       * posix/Versions (GLIBC_2.29): Add
+       posix_spawn_file_actions_addchdir_np.
+       * posix/spawn_faction_addchdir.c: New file.
+       * posix/spawn_faction_destroy.c
+       (__posix_spawn_file_actions_destroy): Handle spawn_do_chdir.
+       * posix/spawn.h (posix_spawn_file_actions_addchdir_np): Declare.
+       * posix/spawn_int.h (struct __spawn_action): Add spawn_do_chdir,
+       chdir_action.
+       * posix/tst-spawn-chdir.c: New file.
+       * sysdeps/posix/spawni.c (__spawni_child): Handle spawn_do_chdir.
+       * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Likewise.
+       * sysdeps/mach/hurd/i386/libc.abilist (GLIBC_2.29): Add
+       posix_spawn_file_actions_addchdir_np.
+       * sysdeps/unix/sysv/linux/aarch64/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/alpha/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/arm/libc.abilist (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/hppa/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/i386/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/ia64/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/microblaze/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+       (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+       (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+       (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+       (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/nios2/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+       (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+       (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
+       (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
+       (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/sh/libc.abilist (GLIBC_2.29): Likewise.
+       * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist (GLIBC_2.29):
+       Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist (GLIBC_2.29):
+       Likewise.
+
 2018-11-06  Gabriel F. T. Gomes  <gabriel@inconstante.eti.br>
 
        * misc/Makefile (tests): Add tst-ldbl-error.
diff --git a/NEWS b/NEWS
index 3d13b321a7f221b4141543eeab8b3762f1447c6d..f488821af12cc70199cc2fe0263ad1506feb0a6c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,11 @@ Major new features:
   HTM state is saved and restore lazily (the state being saved even when the
   process actually does not use HTM).
 
+* The posix_spawn_file_actions_addchdir_np function has been added,
+  enabling posix_spawn and posix_spawnp to run the new process in a
+  different directory.  This is a GNU extension and similar to the
+  Solaris function of the same name.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * The glibc.tune tunable namespace has been renamed to glibc.cpu and the
index 83162123f9c927a0a171dfcdf7ead27efd7f1858..d67f68d0db4201529cadd053a8ee4dd37a0a8f91 100644 (file)
@@ -55,6 +55,7 @@ routines :=                                                                 \
        pread pwrite pread64 pwrite64                                         \
        spawn_faction_init spawn_faction_destroy spawn_faction_addclose       \
        spawn_faction_addopen spawn_faction_adddup2 spawn_valid_fd            \
+       spawn_faction_addchdir                                                \
        spawnattr_init spawnattr_destroy                                      \
        spawnattr_getdefault spawnattr_setdefault                             \
        spawnattr_getflags spawnattr_setflags                                 \
@@ -96,7 +97,7 @@ tests         := test-errno tstgetopt testfnm runtests runptests \
                   tst-posix_fadvise tst-posix_fadvise64 \
                   tst-sysconf-empty-chroot tst-glob_symlinks tst-fexecve \
                   tst-glob-tilde test-ssize-max tst-spawn4 bug-regex37 \
-                  bug-regex38 tst-regcomp-truncated
+                  bug-regex38 tst-regcomp-truncated tst-spawn-chdir
 tests-internal := bug-regex5 bug-regex20 bug-regex33 \
                   tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 \
                   tst-glob_lstat_compat tst-spawn4-compat
index cad4c23e8c08e0f6321776f105cbff1c352ddc0b..56ab921562e4aacdc613d440d63be4629c96d3c8 100644 (file)
@@ -137,6 +137,9 @@ libc {
   GLIBC_2.27 {
     glob; glob64;
   }
+  GLIBC_2.29 {
+    posix_spawn_file_actions_addchdir_np;
+  }
   GLIBC_PRIVATE {
     __libc_fork; __libc_pread; __libc_pwrite;
     __nanosleep_nocancel; __pause_nocancel;
index aafb27611cc4f2543bed4f8ff7abf1405621ace4..c84ee4bf72722f40d02cdb82f491b7ddc3a3c23c 100644 (file)
@@ -185,6 +185,13 @@ extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *
                                             __file_actions,
                                             int __fd, int __newfd) __THROW;
 
+#ifdef __USE_GNU
+/* 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 *,
+                                                const char *__path) __THROW;
+#endif
+
 __END_DECLS
 
 #endif /* spawn.h */
diff --git a/posix/spawn_faction_addchdir.c b/posix/spawn_faction_addchdir.c
new file mode 100644 (file)
index 0000000..0e7a45a
--- /dev/null
@@ -0,0 +1,53 @@
+/* Add a directory change to a file action list for posix_spawn.
+   Copyright (C) 2000-2018 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <spawn.h>
+#include <string.h>
+
+#include "spawn_int.h"
+
+int
+posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *file_actions,
+                                      const char *path)
+{
+  struct __spawn_action *rec;
+
+  char *path_copy = __strdup (path);
+  if (path_copy == NULL)
+    return ENOMEM;
+
+  /* Allocate more memory if needed.  */
+  if (file_actions->__used == file_actions->__allocated
+      && __posix_spawn_file_actions_realloc (file_actions) != 0)
+    {
+      /* This can only mean we ran out of memory.  */
+      free (path_copy);
+      return ENOMEM;
+    }
+
+  /* Add the new value.  */
+  rec = &file_actions->__actions[file_actions->__used];
+  rec->tag = spawn_do_chdir;
+  rec->action.chdir_action.path = path_copy;
+
+  /* Account for the new entry.  */
+  ++file_actions->__used;
+
+  return 0;
+}
index 2a2de4e41d6bd6d0408da00682e00f6038e024b4..05ca9dc13b97603da7695862a1b37cea69a7ce50 100644 (file)
@@ -33,6 +33,9 @@ __posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *file_actions)
        case spawn_do_open:
          free (sa->action.open_action.path);
          break;
+       case spawn_do_chdir:
+         free (sa->action.chdir_action.path);
+         break;
        case spawn_do_close:
        case spawn_do_dup2:
          /* No cleanup required.  */
index 171f67c649746477dd6298f3595fa2179a6b71cc..9db35553c20c19015547991ab1c82f54d9317e30 100644 (file)
@@ -29,7 +29,8 @@ struct __spawn_action
   {
     spawn_do_close,
     spawn_do_dup2,
-    spawn_do_open
+    spawn_do_open,
+    spawn_do_chdir,
   } tag;
 
   union
@@ -50,6 +51,10 @@ struct __spawn_action
       int oflag;
       mode_t mode;
     } open_action;
+    struct
+    {
+      char *path;
+    } chdir_action;
   } action;
 };
 
diff --git a/posix/tst-spawn-chdir.c b/posix/tst-spawn-chdir.c
new file mode 100644 (file)
index 0000000..dc14f20
--- /dev/null
@@ -0,0 +1,192 @@
+/* Test the posix_spawn_file_actions_addchdir_np function.
+   Copyright (C) 2018 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <array_length.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <spawn.h>
+#include <stdlib.h>
+#include <string.h>
+#include <support/check.h>
+#include <support/support.h>
+#include <support/temp_file.h>
+#include <support/xstdio.h>
+#include <support/xunistd.h>
+#include <unistd.h>
+
+/* Reads the file at PATH, which must consist of exactly one line.
+   Removes the line terminator at the end of the file.  */
+static char *
+read_one_line (const char *path)
+{
+  FILE *fp = xfopen (path, "r");
+  char *buffer = NULL;
+  size_t length = 0;
+  ssize_t ret = getline (&buffer, &length, fp);
+  if (ferror (fp))
+    FAIL_EXIT1 ("getline: %m");
+  if (ret < 1)
+    FAIL_EXIT1 ("getline returned %zd", ret);
+  if (fgetc (fp) != EOF)
+    FAIL_EXIT1 ("trailing bytes in %s", path);
+  if (ferror (fp))
+    FAIL_EXIT1 ("fgetc: %m");
+  xfclose (fp);
+  if (buffer[ret - 1] != '\n')
+    FAIL_EXIT1 ("missing line terminator in %s", path);
+  buffer[ret - 1] = 0;
+  return buffer;
+}
+
+/* Return the path to the "pwd" program.  */
+const char *
+get_pwd_program (void)
+{
+  const char *const paths[] = { "/bin/pwd", "/usr/bin/pwd" };
+  for (size_t i = 0; i < array_length (paths); ++i)
+    if (access (paths[i], X_OK) == 0)
+      return paths[i];
+  FAIL_EXIT1 ("cannot find pwd program");
+}
+
+static int
+do_test (void)
+{
+  /* Directory for temporary file data.  Each subtest uses a numeric
+     subdirectory.  */
+  char *directory = support_create_temp_directory ("tst-spawn-chdir-");
+  {
+    /* Avoid symbolic links, to get more consistent behavior from the
+       pwd command.  */
+    char *tmp = realpath (directory, NULL);
+    if (tmp == NULL)
+      FAIL_EXIT1 ("realpath: %m");
+    free (directory);
+    directory = tmp;
+  }
+
+  char *original_cwd = get_current_dir_name ();
+  if (original_cwd == NULL)
+    FAIL_EXIT1 ("get_current_dir_name: %m");
+
+  int iteration = 0;
+  for (int do_spawnp = 0; do_spawnp < 2; ++do_spawnp)
+    for (int do_overwrite = 0; do_overwrite < 2; ++do_overwrite)
+      {
+        ++iteration;
+        printf ("info: iteration=%d do_spawnp=%d do_overwrite=%d\n",
+                iteration, do_spawnp, do_overwrite);
+
+        /* The "pwd" program runs in this directory.  */
+        char *iteration_directory = xasprintf ("%s/%d", directory, iteration);
+        add_temp_file (iteration_directory);
+        xmkdir (iteration_directory, 0777);
+
+        /* This file receives output from "pwd".  */
+        char *output_file_path
+          = xasprintf ("%s/output-file", iteration_directory);
+        add_temp_file (output_file_path);
+
+        /* This subdirectory is used for chdir ordering checks.  */
+        char *subdir_path = xasprintf ("%s/subdir", iteration_directory);
+        add_temp_file (subdir_path);
+        xmkdir (subdir_path, 0777);
+
+        /* Also used for checking the order of actions.  */
+        char *probe_file_path
+          = xasprintf ("%s/subdir/probe-file", iteration_directory);
+        add_temp_file (probe_file_path);
+        TEST_COMPARE (access (probe_file_path, F_OK), -1);
+        TEST_COMPARE (errno, ENOENT);
+
+        /* This symbolic link is used in a relative path with
+           posix_spawn.  */
+        char *pwd_symlink_path
+          = xasprintf ("%s/subdir/pwd-symlink", iteration_directory);
+        xsymlink (get_pwd_program (), pwd_symlink_path);
+        add_temp_file (pwd_symlink_path);
+
+        posix_spawn_file_actions_t actions;
+        TEST_COMPARE (posix_spawn_file_actions_init (&actions), 0);
+        TEST_COMPARE (posix_spawn_file_actions_addchdir_np
+                      (&actions, subdir_path), 0);
+        TEST_COMPARE (posix_spawn_file_actions_addopen
+                      (&actions, 3, /* Arbitrary unused descriptor.  */
+                       "probe-file",
+                       O_WRONLY | O_CREAT | O_EXCL, 0777), 0);
+        TEST_COMPARE (posix_spawn_file_actions_addclose (&actions, 3), 0);
+        /* Run the actual in iteration_directory.  */
+        TEST_COMPARE (posix_spawn_file_actions_addchdir_np (&actions, ".."), 0);
+        TEST_COMPARE (posix_spawn_file_actions_addopen
+                      (&actions, STDOUT_FILENO, "output-file",
+                       O_WRONLY | O_CREAT | O_EXCL, 0777), 0);
+
+        /* Check that posix_spawn_file_actions_addchdir_np made a copy
+           of the path.  */
+        if (do_overwrite)
+          subdir_path[0] = '\0';
+
+        char *const argv[] = { (char *) "pwd", NULL };
+        char *const envp[] = { NULL } ;
+        pid_t pid;
+        if (do_spawnp)
+          TEST_COMPARE (posix_spawnp (&pid, "pwd", &actions,
+                                      NULL, argv, envp), 0);
+        else
+          TEST_COMPARE (posix_spawn (&pid, "subdir/pwd-symlink", &actions,
+                                     NULL, argv, envp), 0);
+        TEST_VERIFY (pid > 0);
+        int status;
+        xwaitpid (pid, &status, 0);
+        TEST_COMPARE (status, 0);
+
+        /* Check that the current directory did not change.  */
+        {
+          char *cwd = get_current_dir_name ();
+          if (cwd == NULL)
+            FAIL_EXIT1 ("get_current_dir_name: %m");
+          TEST_COMPARE_BLOB (original_cwd, strlen (original_cwd),
+                             cwd, strlen (cwd));
+          free (cwd);
+        }
+
+
+        /* Check the output from "pwd".  */
+        {
+          char *pwd = read_one_line (output_file_path);
+          TEST_COMPARE_BLOB (iteration_directory, strlen (iteration_directory),
+                             pwd, strlen (pwd));
+          free (pwd);
+        }
+
+        /* This file must now exist.  */
+        TEST_COMPARE (access (probe_file_path, F_OK), 0);
+
+        TEST_COMPARE (posix_spawn_file_actions_destroy (&actions), 0);
+        free (pwd_symlink_path);
+        free (probe_file_path);
+        free (subdir_path);
+        free (output_file_path);
+      }
+
+  free (directory);
+
+  return 0;
+}
+
+#include <support/test-driver.c>
index e3fc05137b18194b18f287d6d30c670f2dd4ed36..62674e9ba7b2e60359c8964bd345c1fc061336c1 100644 (file)
@@ -2038,6 +2038,7 @@ GLIBC_2.27 wcstof64x_l F
 GLIBC_2.28 fcntl64 F
 GLIBC_2.28 renameat2 F
 GLIBC_2.28 statx F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index b138ab4393cabbd8d1bec663bb8a000288ed1680..c42fbd590e39e41623f7af095cafd88312a5e8df 100644 (file)
@@ -209,6 +209,11 @@ __spawni_child (void *arguments)
                  != action->action.dup2_action.newfd)
                goto fail;
              break;
+
+           case spawn_do_chdir:
+             if (__chdir (action->action.chdir_action.path) != 0)
+               goto fail;
+             break;
            }
        }
     }
index 15f966f841173afae91d47ef6dfb64bd3a096ca9..e66c741d046cdce2edaf1e605fae2ce160b6f18a 100644 (file)
@@ -2138,3 +2138,4 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
index e22b91655dd5f7e0ee06bb445081f41cca02ebcd..8df162fe9993a1d54b58bf3c06b83f1caaad6689 100644 (file)
@@ -2033,6 +2033,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index a231812eea6dc55621263a4ed03a2ac26b8a0f41..43c804f9dc7fa9d25fdcdf99f2fe5d75f5181914 100644 (file)
@@ -123,6 +123,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
index 24b11b15c0e711403c691b6fe3d06cb0b6ed4bda..88b01c2e7598d0e8815fb4e1ef3af7fcaf18b92d 100644 (file)
@@ -1880,6 +1880,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 9762c81365b0abcdcef47e38e694a2c64f256c4c..6d02f31612b233bf291da4c56374b8a0f6927b46 100644 (file)
@@ -2045,6 +2045,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 50c94adff93b5bb4d5b0d19c5ae2293fe9339627..424971261197fdfa625caf562d8c2abf763556f6 100644 (file)
@@ -1914,6 +1914,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index f57be98e494d0701762e79e3c3752607b313c9c9..d47b808862f4b02a416f8b717cc99a1451793ea4 100644 (file)
@@ -124,6 +124,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0x98
 GLIBC_2.4 _IO_2_1_stdin_ D 0x98
index ddc7ebca673a466c8a25f675ec64f15ea4361829..d5e38308be84b567793139d4222a1bdbbab22c07 100644 (file)
@@ -1989,6 +1989,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index daed511f0025ce16400c989f72180899b14d14db..8596b843990d3cfd990138e48994e9de7c989c27 100644 (file)
@@ -2130,3 +2130,4 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
index dda9797e0ea736f664c4451f7f1399d03f299cc5..88e0f896d59f59d66dc915b67cf95bae751a4780 100644 (file)
@@ -1967,6 +1967,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 42e930d56595083e40e63f195d2ca4a3eb9e9b0a..aff7462c34683c4f7a2812887b6f9fc41949ab6d 100644 (file)
@@ -1965,6 +1965,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index f89b44f3a14d0f85597be63624b01a2a4a7558d9..71d82444aa9c9319dd3a8a24744aa4bdad19b26c 100644 (file)
@@ -1973,6 +1973,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 1486af11d755d37ebad7c467b68c5fbe2f4f121d..de6c53d293d14b82231486c0cf7ec557e47e765c 100644 (file)
@@ -1968,6 +1968,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index aab1c44e467f0ed2b31980ac2cd8da7a7645e731..e724bab9fb2dff4bbf821e3cd15d5133ef255e91 100644 (file)
@@ -2171,3 +2171,4 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
index 45839ed25b0fde5fd134f01116fc811c39088156..e9ecbccb715b5b6cc8bae72c1cce8a9db88220f6 100644 (file)
@@ -1993,6 +1993,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 344e5ae87c5d76b2c57c79e5ec0554f3cb752483..da83ea602838ff1d8a1ada394a6a9d638813f049 100644 (file)
@@ -1997,6 +1997,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index e26930e728a16c7a19c98183af5068a788c847c0..4535b40d1516dbcf89a1b7fa666a13c49fc07495 100644 (file)
@@ -2228,3 +2228,4 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
index 8c1781adf49a7432d0f7ea5acc4fb512c9f8a0ee..65725de4f0aecce602fd95f199953811f9504f4c 100644 (file)
@@ -123,6 +123,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 _Exit F
 GLIBC_2.3 _IO_2_1_stderr_ D 0xe0
 GLIBC_2.3 _IO_2_1_stdin_ D 0xe0
index daacceebd63c249e67a8f968c72534eb011a1dc5..bbb3c4a8e71843cc80ad4ca77c180c0f797df55c 100644 (file)
@@ -2100,3 +2100,4 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
index 3a5ec2a1e47b5da58be0f250a63fa87a44bb110d..e85ac2a1787080c33f9c100156ba4b07a650a0c9 100644 (file)
@@ -2002,6 +2002,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 04a539ff02bc5aa838710a95cf7d4753609dc40e..d56931022cf4d67f2bf17f4b49f2a5f65f234d4f 100644 (file)
@@ -1908,6 +1908,7 @@ GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
 GLIBC_2.29 __fentry__ F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 1f4e648baade9c47e42e89335354e75c1fed7402..ff939a15c4c40f9529414591184243258023e904 100644 (file)
@@ -1884,6 +1884,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index d308ac8b0527cb3fb08f43a4b142abbc09968216..64fa9e10a554921f6f4b9de81186d88a44cd1cd2 100644 (file)
@@ -1996,6 +1996,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 6731ebfc2877c5c6472db374405c5691a4cb5c16..db909d150607a684a5cc8e1fe37f99c03167aaad 100644 (file)
@@ -1937,6 +1937,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 85239cedbf2a5ab51cb4b38ebd94bf182603fb8a..9f3a137b5ccc288472239fb291e6997e671d63d8 100644 (file)
@@ -258,6 +258,11 @@ __spawni_child (void *arguments)
                  != action->action.dup2_action.newfd)
                goto fail;
              break;
+
+           case spawn_do_chdir:
+             if (__chdir (action->action.chdir_action.path) != 0)
+               goto fail;
+             break;
            }
        }
     }
index 816e4a742632ad4406b35fee3dcc98c801bc93d1..3b175f104b2a7632b5c8001e8de833a780534d82 100644 (file)
@@ -1895,6 +1895,7 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
index 6fee16a850adc7b8f72615efa6a75c9d25afb0c7..1b57710477464aeb4c0d2229b79d4b769c206c31 100644 (file)
@@ -2146,3 +2146,4 @@ GLIBC_2.28 thrd_current F
 GLIBC_2.28 thrd_equal F
 GLIBC_2.28 thrd_sleep F
 GLIBC_2.28 thrd_yield F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
This page took 0.103592 seconds and 5 git commands to generate.