diff options
author | Bruno Haible <bruno@clisp.org> | 2019-06-10 16:16:16 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-06-10 16:29:44 +0200 |
commit | d822de87e4d1c97e422e48332542dfe7261c7d82 (patch) | |
tree | 1890dfa2476361f50390188afbc4710a90c37133 /modules | |
parent | 2ad7a33b829d0378fb6765e778e4170a3fec9697 (diff) | |
download | gnulib-d822de87e4d1c97e422e48332542dfe7261c7d82.tar.gz |
posix_spawn_file_actions_addfchdir: New module.
* lib/spawn.in.h (posix_spawn_file_actions_addfchdir): New declaration.
* lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_fchdir' and
union member 'fchdir_action'.
* lib/spawn_faction_addfchdir.c: New file.
* lib/spawni.c (__spawni): Implement the spawn_do_fchdir action.
* m4/posix_spawn_faction_addfchdir.m4: New file.
* m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module
'posix_spawn_file_actions_addfchdir' is present and whether
posix_spawn_file_actions_addfchdir_np exists. Set REPLACE_POSIX_SPAWN.
* m4/spawn_h.m4 (gl_SPAWN_H): Test whether
posix_spawn_file_actions_addfchdir is declared.
(gl_SPAWN_H_DEFAULTS): Initialize
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR.
* modules/spawn (Makefile.am): Substitute
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR.
* modules/posix_spawn_file_actions_addfchdir: New file.
* tests/test-spawn-c++.cc (posix_spawn_file_actions_addfchdir): Check
signature.
* doc/posix-functions/posix_spawn.texi: Mention the new module.
* doc/posix-functions/posix_spawnp.texi: Likewise.
* doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
Likewise.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/posix_spawn_file_actions_addfchdir | 30 | ||||
-rw-r--r-- | modules/spawn | 3 |
2 files changed, 33 insertions, 0 deletions
diff --git a/modules/posix_spawn_file_actions_addfchdir b/modules/posix_spawn_file_actions_addfchdir new file mode 100644 index 0000000000..cd9cb99f2f --- /dev/null +++ b/modules/posix_spawn_file_actions_addfchdir @@ -0,0 +1,30 @@ +Description: +posix_spawn_file_actions_addfchdir() function: augment a child process actions +specification. + +Files: +lib/spawn_faction_addfchdir.c +lib/spawn_int.h +m4/posix_spawn_faction_addfchdir.m4 + +Depends-on: +spawn +posix_spawn_file_actions_init [test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR = 1] + +configure.ac: +gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR +if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR = 1; then + AC_LIBOBJ([spawn_faction_addfchdir]) +fi +gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_addfchdir]) + +Makefile.am: + +Include: +<spawn.h> + +License: +LGPLv2+ + +Maintainer: +all diff --git a/modules/spawn b/modules/spawn index dc861d3f6f..6e032943d1 100644 --- a/modules/spawn +++ b/modules/spawn @@ -35,6 +35,7 @@ spawn.h: spawn.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)/g' \ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)/g' \ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)/g' \ + -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR)/g' \ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)/g' \ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY)/g' \ -e 's/@''GNULIB_POSIX_SPAWNATTR_INIT''@/$(GNULIB_POSIX_SPAWNATTR_INIT)/g' \ @@ -55,10 +56,12 @@ spawn.h: spawn.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''HAVE_POSIX_SPAWNATTR_T''@|$(HAVE_POSIX_SPAWNATTR_T)|g' \ -e 's|@''HAVE_POSIX_SPAWN_FILE_ACTIONS_T''@|$(HAVE_POSIX_SPAWN_FILE_ACTIONS_T)|g' \ -e 's|@''HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR''@|$(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)|g' \ + -e 's|@''HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR''@|$(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR)|g' \ -e 's|@''REPLACE_POSIX_SPAWN''@|$(REPLACE_POSIX_SPAWN)|g' \ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)|g' \ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)|g' \ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)|g' \ + -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR)|g' \ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ |