Imported Upstream version 1.4.19
[platform/upstream/m4.git] / lib / spawn_int.h
index f22a659..0ca7dcb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2008-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2008-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
@@ -12,7 +12,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <sys/types.h>
 
@@ -23,7 +23,9 @@ struct __spawn_action
   {
     spawn_do_close,
     spawn_do_dup2,
-    spawn_do_open
+    spawn_do_open,
+    spawn_do_chdir,
+    spawn_do_fchdir
   } tag;
 
   union
@@ -40,10 +42,18 @@ struct __spawn_action
     struct
     {
       int fd;
-      const char *path;
+      char *path;
       int oflag;
       mode_t mode;
     } open_action;
+    struct
+    {
+      char *path;
+    } chdir_action;
+    struct
+    {
+      int fd;
+    } fchdir_action;
   } action;
 };
 
@@ -58,5 +68,5 @@ extern int __posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *
 #endif
 extern int __spawni (pid_t *pid, const char *path,
                      const posix_spawn_file_actions_t *file_actions,
-                     const posix_spawnattr_t *attrp, char *const argv[],
-                     char *const envp[], int use_path);
+                     const posix_spawnattr_t *attrp, const char *const argv[],
+                     const char *const envp[], int use_path);