1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00

Add popen feature

* doc/ref/api-options.texi (Common Feature Symbols): Document the popen
  feature.
* doc/ref/posix.texi (Pipes): Depend on the popen feature, not fork.
* libguile/posix.c (scm_init_posix): Add popen feature if we can.
This commit is contained in:
Andy Wingo 2016-07-14 16:33:32 +02:00
parent 4e02ce55a6
commit e8c93013e3
3 changed files with 7 additions and 3 deletions

View file

@ -284,8 +284,11 @@ Indicates support for POSIX functions: @code{pipe}, @code{getgroups},
@item fork @item fork
Indicates support for the POSIX @code{fork} function (@pxref{Processes, Indicates support for the POSIX @code{fork} function (@pxref{Processes,
@code{primitive-fork}}). This is a prerequisite for the @code{(ice-9 @code{primitive-fork}}).
popen)} module (@pxref{Pipes}).
@item popen
Indicates support for @code{open-pipe} in the @code{(ice-9 popen)}
module (@pxref{Pipes}).
@item random @item random
Indicates availability of random number generation functions: Indicates availability of random number generation functions:

View file

@ -2262,7 +2262,7 @@ controlling terminal. The return value is unspecified.
The following procedures are similar to the @code{popen} and The following procedures are similar to the @code{popen} and
@code{pclose} system routines. The code is in a separate ``popen'' @code{pclose} system routines. The code is in a separate ``popen''
module@footnote{This module is only available on systems where the module@footnote{This module is only available on systems where the
@code{fork} feature is provided (@pxref{Common Feature Symbols}).}: @code{popen} feature is provided (@pxref{Common Feature Symbols}).}:
@lisp @lisp
(use-modules (ice-9 popen)) (use-modules (ice-9 popen))

View file

@ -2339,6 +2339,7 @@ scm_init_posix ()
scm_add_feature ("fork"); scm_add_feature ("fork");
#endif /* HAVE_FORK */ #endif /* HAVE_FORK */
#ifdef HAVE_START_CHILD #ifdef HAVE_START_CHILD
scm_add_feature ("popen");
scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION, scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
"scm_init_popen", "scm_init_popen",
(scm_t_extension_init_func) scm_init_popen, (scm_t_extension_init_func) scm_init_popen,